[devdocsgjs/main: 1743/1867] Update Fish documentation (3.3.0)
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1743/1867] Update Fish documentation (3.3.0)
- Date: Fri, 19 Nov 2021 23:48:17 +0000 (UTC)
commit fa944530699726ec9001d8a356f6abbb49157845
Author: Simon Legner <Simon Legner gmail com>
Date: Sun Jul 4 11:13:12 2021 +0200
Update Fish documentation (3.3.0)
assets/javascripts/templates/pages/about_tmpl.coffee | 2 +-
lib/docs/filters/fish/clean_html_sphinx.rb | 3 +++
lib/docs/filters/fish/entries_sphinx.rb | 6 +++++-
lib/docs/scrapers/fish.rb | 10 +++++++++-
4 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee
b/assets/javascripts/templates/pages/about_tmpl.coffee
index c0305f2d..c23848bd 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -303,7 +303,7 @@ credits = [
'https://raw.githubusercontent.com/falconry/falcon/master/LICENSE'
], [
'Fish',
- '2005-2009 Axel Liljencrantz, 2009-2020 fish-shell contributors',
+ '2005–2009 Axel Liljencrantz, 2009–2021 fish-shell contributors',
'GPLv2',
'https://fishshell.com/docs/current/license.html'
], [
diff --git a/lib/docs/filters/fish/clean_html_sphinx.rb b/lib/docs/filters/fish/clean_html_sphinx.rb
index 1d59c13b..d14832a4 100755
--- a/lib/docs/filters/fish/clean_html_sphinx.rb
+++ b/lib/docs/filters/fish/clean_html_sphinx.rb
@@ -3,6 +3,9 @@ module Docs
class CleanHtmlSphinxFilter < Filter
def call
@doc = at_css('.body')
+ css('pre[data-language="fish"]').each do |node|
+ node['data-language'] = 'shell'
+ end
doc
end
end
diff --git a/lib/docs/filters/fish/entries_sphinx.rb b/lib/docs/filters/fish/entries_sphinx.rb
index 50341823..9d33de17 100755
--- a/lib/docs/filters/fish/entries_sphinx.rb
+++ b/lib/docs/filters/fish/entries_sphinx.rb
@@ -20,13 +20,17 @@ module Docs
'Commands'
elsif slug == 'tutorial'
'Tutorial'
+ elsif slug == 'interactive'
+ 'Interactive use'
+ elsif slug == 'language'
+ 'fish language'
else
nil # Remaining pages are indexes we don't need
end
end
def additional_entries
- if root_page? || slug == 'tutorial'
+ if root_page? || slug == 'tutorial' || slug == 'interactive' || slug == 'language'
css('h2').map.with_index do |node, i|
name = node.content.split(' - ').first.strip
name.prepend "#{i + 1}. "
diff --git a/lib/docs/scrapers/fish.rb b/lib/docs/scrapers/fish.rb
index 08f240e9..f828d7aa 100644
--- a/lib/docs/scrapers/fish.rb
+++ b/lib/docs/scrapers/fish.rb
@@ -12,10 +12,18 @@ module Docs
# https://fishshell.com/docs/current/license.html
options[:attribution] = <<-HTML
- © 2020 fish-shell developers<br>
+ © 2021 fish-shell developers<br>
Licensed under the GNU General Public License, version 2.
HTML
+ version '3.3' do
+ self.release = '3.3.0'
+ 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.2' do
self.release = '3.2.0'
self.base_url = "https://fishshell.com/docs/#{version}/"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]