From a8ed38260f65cbb1f9e4a523cf290a56e1592a6d Mon Sep 17 00:00:00 2001 From: TK Lai Date: Tue, 25 Jun 2024 18:00:27 +0800 Subject: [PATCH] Add Laravel 11 documentation --- lib/docs/scrapers/laravel.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index 9b3c0771..ac7a667c 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -29,6 +29,20 @@ module Docs Laravel is a trademark of Taylor Otwell. HTML + version '11' do + self.release = '11.11.1' + self.root_path = '/api/11.x/index.html' + self.initial_paths = %w(/docs/11.x/installation /api/11.x/classes.html) + + options[:only_patterns] = [%r{\A/api/11\.x/}, %r{\A/docs/11\.x/}] + + options[:fix_urls] = ->(url) do + url.sub! %r{11.x/+}, "11.x/" + url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?![1-9]?\d)}, "#{Laravel.base_url}/docs/11.x/" + url + end + end + version '10' do self.release = '10.13.0' self.root_path = '/api/10.x/index.html'