History

Update Laravel documentation (9.3.8)

Simon Legner committed 4 years ago

Commit 6d69e1e1 parent d19bb432 files · +16 −2Browse files

Unified · Split

2 files
  1. lib/docs/filters/laravel/clean_html.rb +1 −1
  2. lib/docs/scrapers/laravel.rb +15 −1
lib/docs/filters/laravel/clean_html.rb+1−1
@@ -56,7 +56,7 @@ module Docs · 55 unmodified lines
56 end56 end
57 57
58 def other58 def other
59 @doc = at_css('.docs_body')59 @doc = at_css('#main-content')
60 60
61 # Clean up headings61 # Clean up headings
62 css('h2 > a').each do |node|62 css('h2 > a').each do |node|
lib/docs/scrapers/laravel.rb+15−1
@@ -10,7 +10,7 @@ module Docs · 9 unmodified lines
10 html_filters.push 'laravel/entries', 'laravel/clean_html'10 html_filters.push 'laravel/entries', 'laravel/clean_html'
11 11
12 options[:container] = ->(filter) {12 options[:container] = ->(filter) {
13 filter.subpath.start_with?('/api') ? '#content' : '.page_contain'13 filter.subpath.start_with?('/api') ? '#content' : '#docsScreen'
14 }14 }
15 15
16 options[:skip_patterns] = [16 options[:skip_patterns] = [
@@ -29,6 +29,20 @@ module Docs · 12 unmodified lines
29 Laravel is a trademark of Taylor Otwell.29 Laravel is a trademark of Taylor Otwell.
30 HTML30 HTML
31 31
32 version '9' do
33 self.release = '9.3.8'
34 self.root_path = '/api/9.x/index.html'
35 self.initial_paths = %w(/docs/9.x/installation /api/9.x/classes.html)
36
37 options[:only_patterns] = [%r{\A/api/9\.x/}, %r{\A/docs/9\.x/}]
38
39 options[:fix_urls] = ->(url) do
40 url.sub! %r{9.x/+}, "9.x/"
41 url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/9.x/"
42 url
43 end
44 end
45
32 version '8' do46 version '8' do
33 self.release = '8.4.1'47 self.release = '8.4.1'
34 self.root_path = '/api/8.x/index.html'48 self.root_path = '/api/8.x/index.html'