Browse Source

Update Fish documentation (4.0.1)

Simon Legner 9 months ago
parent
commit
29f6e1c84c
2 changed files with 11 additions and 3 deletions
  1. 1 1
      lib/docs/filters/fish/entries_sphinx.rb
  2. 10 2
      lib/docs/scrapers/fish.rb

+ 1 - 1
lib/docs/filters/fish/entries_sphinx.rb

@@ -14,7 +14,7 @@ module Docs
       end
 
       def get_type
-        if root_page? || slug == 'faq' || slug == 'completions' || slug == 'fish_for_bash_users'
+        if root_page? || slug == 'faq' || slug == 'completions' || slug == 'fish_for_bash_users' || slug == 'prompt'
           'Manual'
         elsif slug.starts_with?('cmds') || slug == 'commands'
           'Commands'

+ 10 - 2
lib/docs/scrapers/fish.rb

@@ -8,14 +8,22 @@ module Docs
       code: 'https://github.com/fish-shell/fish-shell'
     }
 
-    options[:skip] = %w(design.html license.html)
+    options[:skip] = %w(design.html license.html contributing.html)
 
     # https://fishshell.com/docs/current/license.html
     options[:attribution] = <<-HTML
-      &copy; 2005-2009 Axel Liljencrantz, 2009-2023 fish-shell contributors<br>
+      &copy; 2005-2009 Axel Liljencrantz, 2009-2025 fish-shell contributors<br>
       Licensed under the GNU General Public License, version 2.
     HTML
 
+    version '4.0' do
+      self.release = '4.0.1'
+      self.base_url = "https://fishshell.com/docs/#{version}/"
+
+      options[:skip].concat %w(genindex.html relnotes.html)
+      html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
+    end
+
     version '3.7' do
       self.release = '3.7.0'
       self.base_url = "https://fishshell.com/docs/#{version}/"