diff --git a/lib/docs/filters/laravel/clean_html.rb b/lib/docs/filters/laravel/clean_html.rb index e43ebda2..9eba084a 100644 --- a/lib/docs/filters/laravel/clean_html.rb +++ b/lib/docs/filters/laravel/clean_html.rb @@ -56,7 +56,7 @@ module Docs end def other - @doc = at_css('.docs_body') + @doc = at_css('#main-content') # Clean up headings css('h2 > a').each do |node| diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index 51a0cced..7641afd0 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -10,7 +10,7 @@ module Docs html_filters.push 'laravel/entries', 'laravel/clean_html' options[:container] = ->(filter) { - filter.subpath.start_with?('/api') ? '#content' : '.page_contain' + filter.subpath.start_with?('/api') ? '#content' : '#docsScreen' } options[:skip_patterns] = [ @@ -29,6 +29,20 @@ module Docs Laravel is a trademark of Taylor Otwell. HTML + version '9' do + self.release = '9.3.8' + self.root_path = '/api/9.x/index.html' + self.initial_paths = %w(/docs/9.x/installation /api/9.x/classes.html) + + options[:only_patterns] = [%r{\A/api/9\.x/}, %r{\A/docs/9\.x/}] + + options[:fix_urls] = ->(url) do + url.sub! %r{9.x/+}, "9.x/" + url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/9.x/" + url + end + end + version '8' do self.release = '8.4.1' self.root_path = '/api/8.x/index.html'