| @@ -3,10 +3,9 @@ module Docs · 2 unmodified lines |
| 3 | self.name = 'Laravel' | 3 | self.name = 'Laravel' |
| 4 | self.slug = 'laravel' | 4 | self.slug = 'laravel' |
| 5 | self.type = 'laravel' | 5 | self.type = 'laravel' |
| 6 | self.release = '5.2.0' | 6 | |
| 7 | self.base_url = 'https://laravel.com' | 7 | self.base_url = 'https://laravel.com' |
| 8 | self.root_path = '/api/5.2/index.html' | 8 | |
| 9 | self.initial_paths = %w(/docs/5.2/installation /api/5.2/classes.html) | | |
| 10 | self.links = { | 9 | self.links = { |
| 11 | home: 'https://laravel.com/', | 10 | home: 'https://laravel.com/', |
| 12 | code: 'https://github.com/laravel/laravel' | 11 | code: 'https://github.com/laravel/laravel' |
| @@ -18,32 +17,45 @@ module Docs · 5 unmodified lines |
| 18 | filter.subpath.start_with?('/api') ? '#content' : '.docs-wrapper' | 17 | filter.subpath.start_with?('/api') ? '#content' : '.docs-wrapper' |
| 19 | } | 18 | } |
| 20 | | 19 | |
| 21 | options[:only_patterns] = [ | 20 | options[:skip_patterns] = [ |
| 22 | /\A\/api\/5\.2\//, | 21 | %r{\A/api/\d\.\d/\.html}, |
| 23 | /\A\/docs\/5\.2\//] | 22 | %r{\A/api/\d\.\d/panel\.html}, |
| 24 | | 23 | %r{\A/api/\d\.\d/namespaces\.html}, |
| 25 | options[:skip] = %w( | 24 | %r{\A/api/\d\.\d/interfaces\.html}, |
| 26 | /docs/5.2/quick | 25 | %r{\A/api/\d\.\d/traits\.html}, |
| 27 | /docs/5.2/releases | 26 | %r{\A/api/\d\.\d/doc-index\.html}, |
| 28 | /docs/5.2/artisan | 27 | %r{\A/api/\d\.\d/Illuminate\.html}, |
| 29 | /docs/5.2/commands | 28 | %r{\A/api/\d\.\d/search\.html} ] |
| 30 | /api/5.2/.html | | |
| 31 | /api/5.2/panel.html | | |
| 32 | /api/5.2/namespaces.html | | |
| 33 | /api/5.2/interfaces.html | | |
| 34 | /api/5.2/traits.html | | |
| 35 | /api/5.2/doc-index.html | | |
| 36 | /api/5.2/Illuminate.html | | |
| 37 | /api/5.2/search.html) | | |
| 38 | | | |
| 39 | options[:fix_urls] = ->(url) do | | |
| 40 | url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/5.2/" | | |
| 41 | url | | |
| 42 | end | | |
| 43 | | 29 | |
| 44 | options[:attribution] = <<-HTML | 30 | options[:attribution] = <<-HTML |
| 45 | © Taylor Otwell<br> | 31 | © Taylor Otwell<br> |
| 46 | Licensed under the MIT License. | 32 | Licensed under the MIT License. |
| 47 | HTML | 33 | HTML |
| | 34 | |
| | 35 | version '5.2' do |
| | 36 | self.release = '5.2.24' |
| | 37 | self.root_path = '/api/5.2/index.html' |
| | 38 | self.initial_paths = %w(/docs/5.2/installation /api/5.2/classes.html) |
| | 39 | |
| | 40 | options[:only_patterns] = [%r{\A/api/5\.2/}, %r{\A/docs/5\.2/}] |
| | 41 | |
| | 42 | options[:fix_urls] = ->(url) do |
| | 43 | url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/5.2/" |
| | 44 | url |
| | 45 | end |
| | 46 | end |
| | 47 | |
| | 48 | version '5.1' do |
| | 49 | self.release = '5.1.11' |
| | 50 | self.root_path = '/api/5.1/index.html' |
| | 51 | self.initial_paths = %w(/docs/5.1/installation /api/5.1/classes.html) |
| | 52 | |
| | 53 | options[:only_patterns] = [%r{\A/api/5\.1/}, %r{\A/docs/5\.1/}] |
| | 54 | |
| | 55 | options[:fix_urls] = ->(url) do |
| | 56 | url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/5.1/" |
| | 57 | url |
| | 58 | end |
| | 59 | end |
| 48 | end | 60 | end |
| 49 | end | 61 | end |