Skip to content

Commit 2b63419

Browse files
authored
Merge pull request #2272 from tklai/laravel-11
Add Laravel 11 documentation
2 parents f4609a1 + a8ed382 commit 2b63419

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/docs/scrapers/laravel.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ class Laravel < UrlScraper
2929
Laravel is a trademark of Taylor Otwell.
3030
HTML
3131

32+
version '11' do
33+
self.release = '11.11.1'
34+
self.root_path = '/api/11.x/index.html'
35+
self.initial_paths = %w(/docs/11.x/installation /api/11.x/classes.html)
36+
37+
options[:only_patterns] = [%r{\A/api/11\.x/}, %r{\A/docs/11\.x/}]
38+
39+
options[:fix_urls] = ->(url) do
40+
url.sub! %r{11.x/+}, "11.x/"
41+
url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?![1-9]?\d)}, "#{Laravel.base_url}/docs/11.x/"
42+
url
43+
end
44+
end
45+
3246
version '10' do
3347
self.release = '10.13.0'
3448
self.root_path = '/api/10.x/index.html'

0 commit comments

Comments
 (0)