laravel: add Laravel 10 documentation

pull/1983/head
TK Lai 2 years ago
parent 03848b9d43
commit ad5853db6f

@ -18,7 +18,7 @@ module Docs
return heading ? "Guides: #{heading.content.strip}" : 'Guides' return heading ? "Guides: #{heading.content.strip}" : 'Guides'
end end
type = slug.remove(%r{api/\d.[0-9x]/}).remove('Illuminate/').remove(/\/\w+?\z/).gsub('/', '\\') type = slug.remove(%r{api/[1-9]?\d.[0-9x]/}).remove('Illuminate/').remove(/\/\w+?\z/).gsub('/', '\\')
if type.end_with?('Console') if type.end_with?('Console')
type.split('\\').first type.split('\\').first

@ -14,14 +14,14 @@ module Docs
} }
options[:skip_patterns] = [ options[:skip_patterns] = [
%r{\A/api/\d\.[0-9x]/\.html}, %r{\A/api/[1-9]?\d\.[0-9x]/\.html},
%r{\A/api/\d\.[0-9x]/panel\.html}, %r{\A/api/[1-9]?\d\.[0-9x]/panel\.html},
%r{\A/api/\d\.[0-9x]/namespaces\.html}, %r{\A/api/[1-9]?\d\.[0-9x]/namespaces\.html},
%r{\A/api/\d\.[0-9x]/interfaces\.html}, %r{\A/api/[1-9]?\d\.[0-9x]/interfaces\.html},
%r{\A/api/\d\.[0-9x]/traits\.html}, %r{\A/api/[1-9]?\d\.[0-9x]/traits\.html},
%r{\A/api/\d\.[0-9x]/doc-index\.html}, %r{\A/api/[1-9]?\d\.[0-9x]/doc-index\.html},
%r{\A/api/\d\.[0-9x]/Illuminate\.html}, %r{\A/api/[1-9]?\d\.[0-9x]/Illuminate\.html},
%r{\A/api/\d\.[0-9x]/search\.html} ] %r{\A/api/[1-9]?\d\.[0-9x]/search\.html} ]
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; Taylor Otwell<br> &copy; Taylor Otwell<br>
@ -29,6 +29,20 @@ module Docs
Laravel is a trademark of Taylor Otwell. Laravel is a trademark of Taylor Otwell.
HTML HTML
version '10' do
self.release = '10.10.0'
self.root_path = '/api/10.x/index.html'
self.initial_paths = %w(/docs/10.x/installation /api/10.x/classes.html)
options[:only_patterns] = [%r{\A/api/10\.x/}, %r{\A/docs/10\.x/}]
options[:fix_urls] = ->(url) do
url.sub! %r{10.x/+}, "10.x/"
url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?![1-9]?\d)}, "#{Laravel.base_url}/docs/10.x/"
url
end
end
version '9' do version '9' do
self.release = '9.3.8' self.release = '9.3.8'
self.root_path = '/api/9.x/index.html' self.root_path = '/api/9.x/index.html'

Loading…
Cancel
Save