| @@ -3,10 +3,9 @@ module Docs · 2 unmodified lines |
| 3 | 3 | self.name = 'Laravel' |
| 4 | 4 | self.slug = 'laravel' |
| 5 | 5 | self.type = 'laravel' |
| 6 | | − self.release = '5.2.0' |
| 6 | + |
| 7 | 7 | self.base_url = 'https://laravel.com' |
| 8 | | − self.root_path = '/api/5.2/index.html' |
| 9 | | − self.initial_paths = %w(/docs/5.2/installation /api/5.2/classes.html) |
| 8 | + |
| 10 | 9 | self.links = { |
| 11 | 10 | home: 'https://laravel.com/', |
| 12 | 11 | code: 'https://github.com/laravel/laravel' |
| @@ -18,32 +17,45 @@ module Docs · 5 unmodified lines |
| 18 | 17 | filter.subpath.start_with?('/api') ? '#content' : '.docs-wrapper' |
| 19 | 18 | } |
| 20 | 19 | |
| 21 | | − options[:only_patterns] = [ |
| 22 | | − /\A\/api\/5\.2\//, |
| 23 | | − /\A\/docs\/5\.2\//] |
| 24 | | − |
| 25 | | − options[:skip] = %w( |
| 26 | | − /docs/5.2/quick |
| 27 | | − /docs/5.2/releases |
| 28 | | − /docs/5.2/artisan |
| 29 | | − /docs/5.2/commands |
| 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 |
| 20 | + options[:skip_patterns] = [ |
| 21 | + %r{\A/api/\d\.\d/\.html}, |
| 22 | + %r{\A/api/\d\.\d/panel\.html}, |
| 23 | + %r{\A/api/\d\.\d/namespaces\.html}, |
| 24 | + %r{\A/api/\d\.\d/interfaces\.html}, |
| 25 | + %r{\A/api/\d\.\d/traits\.html}, |
| 26 | + %r{\A/api/\d\.\d/doc-index\.html}, |
| 27 | + %r{\A/api/\d\.\d/Illuminate\.html}, |
| 28 | + %r{\A/api/\d\.\d/search\.html} ] |
| 43 | 29 | |
| 44 | 30 | options[:attribution] = <<-HTML |
| 45 | 31 | © Taylor Otwell<br> |
| 46 | 32 | Licensed under the MIT License. |
| 47 | 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 | 60 | end |
| 49 | 61 | end |