Update Fish documentation (3.3.0)

pull/1587/head
Simon Legner 4 years ago
parent 67c4b1ccbd
commit fa94453069

@ -303,7 +303,7 @@ credits = [
'https://raw.githubusercontent.com/falconry/falcon/master/LICENSE' 'https://raw.githubusercontent.com/falconry/falcon/master/LICENSE'
], [ ], [
'Fish', 'Fish',
'2005-2009 Axel Liljencrantz, 2009-2020 fish-shell contributors', '20052009 Axel Liljencrantz, 20092021 fish-shell contributors',
'GPLv2', 'GPLv2',
'https://fishshell.com/docs/current/license.html' 'https://fishshell.com/docs/current/license.html'
], [ ], [

@ -3,6 +3,9 @@ module Docs
class CleanHtmlSphinxFilter < Filter class CleanHtmlSphinxFilter < Filter
def call def call
@doc = at_css('.body') @doc = at_css('.body')
css('pre[data-language="fish"]').each do |node|
node['data-language'] = 'shell'
end
doc doc
end end
end end

@ -20,13 +20,17 @@ module Docs
'Commands' 'Commands'
elsif slug == 'tutorial' elsif slug == 'tutorial'
'Tutorial' 'Tutorial'
elsif slug == 'interactive'
'Interactive use'
elsif slug == 'language'
'fish language'
else else
nil # Remaining pages are indexes we don't need nil # Remaining pages are indexes we don't need
end end
end end
def additional_entries 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| css('h2').map.with_index do |node, i|
name = node.content.split(' - ').first.strip name = node.content.split(' - ').first.strip
name.prepend "#{i + 1}. " name.prepend "#{i + 1}. "

@ -12,10 +12,18 @@ module Docs
# https://fishshell.com/docs/current/license.html # https://fishshell.com/docs/current/license.html
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2020 fish-shell developers<br> &copy; 2021 fish-shell developers<br>
Licensed under the GNU General Public License, version 2. Licensed under the GNU General Public License, version 2.
HTML 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 version '3.2' do
self.release = '3.2.0' self.release = '3.2.0'
self.base_url = "https://fishshell.com/docs/#{version}/" self.base_url = "https://fishshell.com/docs/#{version}/"

Loading…
Cancel
Save