diff --git a/assets/images/docs.png b/assets/images/docs.png index 286f700f..a45354cb 100644 Binary files a/assets/images/docs.png and b/assets/images/docs.png differ diff --git a/assets/images/docs@2x.png b/assets/images/docs@2x.png index 407b7648..f1485b29 100644 Binary files a/assets/images/docs@2x.png and b/assets/images/docs@2x.png differ diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index 8f1b4f41..1b7aec2d 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,7 +1,7 @@ [ [ "2016-09-05", - "New documentation: Bottle" + "New documentations: Fish and Bottle" ], [ "2016-08-07", "New documentation: Docker" diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index b0b45219..a5b2c947 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -219,6 +219,11 @@ credits = [ '2016 StrongLoop, IBM, and other expressjs.com contributors.', 'Unknown', 'https://github.com/expressjs/expressjs.com/issues/413' + ], [ + 'Fish', + '2005-2009 Axel Liljencrantz', + 'GPLv2', + 'https://fishshell.com/docs/current/license.html' ], [ 'GCC
GNU Fortran', 'Free Software Foundation', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index 59e9be57..daf7492b 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -116,6 +116,7 @@ ._icon-socketio:before { background-position: -2rem -6rem; } ._icon-modernizr:before { background-position: -3rem -6rem; } ._icon-bower:before { background-position: -4rem -6rem; } +._icon-fish:before { background-position: -5rem -6rem; @extend %darkIconFix !optional; } ._icon-bottle:before { background-position: 0 -7rem; } ._icon-docker:before { background-position: -1rem -7rem; } ._icon-cakephp:before { background-position: -2rem -7rem; } diff --git a/lib/docs/filters/fish/clean_html.rb b/lib/docs/filters/fish/clean_html.rb index 640b4d60..230f29e4 100644 --- a/lib/docs/filters/fish/clean_html.rb +++ b/lib/docs/filters/fish/clean_html.rb @@ -14,12 +14,12 @@ module Docs node.name = 'h2' end - css('h2 > a').each do |node| + css('.anchor').each do |node| node.parent['id'] = node['id'] end css('pre').each do |node| - node['class'] = 'fish' # Prism may support fish in the future + node['data-language'] = 'fish' # Prism may support fish in the future node.content = node.content end diff --git a/lib/docs/filters/fish/entries.rb b/lib/docs/filters/fish/entries.rb index 6b878d90..9c30f750 100644 --- a/lib/docs/filters/fish/entries.rb +++ b/lib/docs/filters/fish/entries.rb @@ -1,17 +1,28 @@ module Docs class Fish class EntriesFilter < Docs::EntriesFilter + def get_name + if slug == 'faq' + 'FAQ' + else + slug.capitalize + end + end - def include_default_entry? - false + def get_type + if root_page? || slug == 'faq' + 'Manual' + else + name + end end def additional_entries - css('h2').each_with_object [] do |node, entries| - name = node.content.split(' - ').first - id = node['id'] - type = root_page? ? 'Reference' : (slug == 'faq' ? 'FAQ' : slug.capitalize) - entries << [name, id, type] + return [] if slug == 'faq' + css('h2').map.with_index do |node, i| + name = node.content.split(' - ').first.strip + name.prepend "#{i + 1}. " unless slug == 'commands' + [name, node['id'], get_type] end end end diff --git a/lib/docs/scrapers/fish.rb b/lib/docs/scrapers/fish.rb index 73357195..d087700a 100644 --- a/lib/docs/scrapers/fish.rb +++ b/lib/docs/scrapers/fish.rb @@ -2,35 +2,29 @@ module Docs class Fish < UrlScraper self.name = 'Fish' self.type = 'fish' + self.root_path = 'index.html' self.links = { - home: 'http://fishshell.com/', + home: 'https://fishshell.com/', code: 'https://github.com/fish-shell/fish-shell' } html_filters.push 'fish/clean_html', 'fish/entries' - options[:only] = %w( - index.html - tutorial.html - commands.html - faq.html - ) + options[:skip] = %w(design.html license.html) options[:attribution] = <<-HTML © 2005–2009 Axel Liljencrantz
- © 2009–2016 The fish contributors
Licensed under the GNU General Public License, version 2. HTML version '2.3' do self.release = '2.3.1' - self.base_url = "http://fishshell.com/docs/#{version}/" - self.root_path = 'index.html' + self.base_url = "https://fishshell.com/docs/#{version}/" end + version '2.2' do self.release = '2.2.0' - self.base_url = "http://fishshell.com/docs/#{version}/" - self.root_path = 'index.html' + self.base_url = "https://fishshell.com/docs/#{version}/" end end end diff --git a/public/icons/docs/fish/16.png b/public/icons/docs/fish/16.png new file mode 100644 index 00000000..aea9980a Binary files /dev/null and b/public/icons/docs/fish/16.png differ diff --git a/public/icons/docs/fish/16@2x.png b/public/icons/docs/fish/16@2x.png new file mode 100644 index 00000000..848b77f2 Binary files /dev/null and b/public/icons/docs/fish/16@2x.png differ diff --git a/public/icons/docs/fish/SOURCE b/public/icons/docs/fish/SOURCE deleted file mode 100644 index 7c7fa625..00000000 --- a/public/icons/docs/fish/SOURCE +++ /dev/null @@ -1 +0,0 @@ -https://github.com/fish-shell/fish-shell/blob/master/doc_src/ascii_fish.png