diff --git a/assets/images/docs-2.png b/assets/images/docs-2.png index cee86d69..91de3f6b 100644 Binary files a/assets/images/docs-2.png and b/assets/images/docs-2.png differ diff --git a/assets/images/docs-2@2x.png b/assets/images/docs-2@2x.png index e236cbdc..457fdf3f 100644 Binary files a/assets/images/docs-2@2x.png and b/assets/images/docs-2@2x.png differ diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index e998c941..ef724717 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,7 +1,7 @@ [ [ "2018-2-4", - "New documentation: JSDoc" + "New documentations: Jekyll and JSDoc" ], [ "2017-11-26", "New documentations: Bluebird, ESLint and Homebrew" diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index adabe626..04da2985 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -320,6 +320,11 @@ credits = [ '2008-2017 Pivotal Labs', 'MIT', 'https://raw.githubusercontent.com/jasmine/jasmine/master/MIT.LICENSE' + ], [ + 'Jekyll', + '2008-2018 Tom Preston-Werner and Jekyll contributors', + 'MIT', + 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE' ], [ 'Jest', '2014-present Facebook Inc.', diff --git a/assets/stylesheets/application-dark.css.scss b/assets/stylesheets/application-dark.css.scss index 96d5e445..c8dc1f8f 100644 --- a/assets/stylesheets/application-dark.css.scss +++ b/assets/stylesheets/application-dark.css.scss @@ -55,6 +55,7 @@ 'pages/github', 'pages/go', 'pages/haskell', + 'pages/jekyll', 'pages/jquery', 'pages/julia', 'pages/knockout', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index 08dcc4dd..427f0eea 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -168,3 +168,4 @@ ._icon-bluebird:before { background-position: -8rem -2rem; @extend %doc-icon-2; } ._icon-eslint:before { background-position: -9rem -2rem; @extend %doc-icon-2; } ._icon-homebrew:before { background-position: 0 -3rem; @extend %doc-icon-2; } +._icon-jekyll:before { background-position: -1rem -3rem; @extend %doc-icon-2; } diff --git a/assets/stylesheets/pages/_jekyll.scss b/assets/stylesheets/pages/_jekyll.scss index 2a30051f..00a86795 100644 --- a/assets/stylesheets/pages/_jekyll.scss +++ b/assets/stylesheets/pages/_jekyll.scss @@ -1,35 +1,7 @@ ._jekyll { - h2, h3 { @extend %block-heading; } + @extend %simple; - .note { - @extend %note; - - h5 { - margin-top: 0.25em; - } - - position: relative; - &::after { - content: attr(data-type); - opacity: 0.5; - text-transform: uppercase; - position: absolute; - top: 0.25em; - right: 0.5em; - font-size: 0.8em; - pointer-events: none; - } - - // Other note types currently unstyled: - // plain - // tip - // feature - &.note-info { @extend %note-blue; } - &.note-warning { @extend %note-red; } - &.note-unreleased { @extend %note-orange; } - } - - pre { - font-size: inherit; - } + .note.info { @extend %note-blue; } + .note.warning { @extend %note-red; } + .note.unreleased { @extend %note-orange; } } diff --git a/lib/docs/filters/jekyll/clean_html.rb b/lib/docs/filters/jekyll/clean_html.rb index d27d0ea4..67e29793 100644 --- a/lib/docs/filters/jekyll/clean_html.rb +++ b/lib/docs/filters/jekyll/clean_html.rb @@ -2,50 +2,38 @@ module Docs class Jekyll class CleanHtmlFilter < Filter def call - css('.improve, .section-nav').each(&:remove) + @doc = at_css('article') + + at_css('h1').content = 'Jekyll' if root_page? + + css('.improve, .section-nav').remove css('div.highlighter-rouge').each do |node| pre = node.at_css('pre') - # copy over the highlighting metadata - match = /language-(\w+)/.match(node['class']) + lang = node['class'][/language-(\w+)/, 1] # HACK: Prism shell highlighting highlights `|`, # which makes the tree on this page look terrible - if match && !(slug == /structure/ && match[1] == 'sh') - lang = match[1] - if lang == 'sh' - lang = 'bash' - elsif lang == 'liquid' - lang = 'django' # Close enough. - end - pre['class'] = nil + unless slug.include?('structure') && lang == 'sh' + lang = 'bash' if lang == 'sh' pre['data-language'] = lang end - # Remove the server-rendered syntax highlighting - code = pre.at_css('code') - code.content = code.text - - # Remove the div.highlighter-rouge and div.highlight wrapping the
- node.add_next_sibling pre - node.remove + pre.remove_attribute('class') + pre.content = pre.content + node.replace(pre) end - css('code').each do |node| - node['class'] = '' - end + css('code').remove_attr('class') css('.note').each do |node| - node_type = /note ?(\w+)?/.match(node['class'])[1] || 'tip' + node.name = 'blockquote' #...->
......(node > 'br').each(&:remove) #...-> #...
...
......node.css('br + br').each(&:remove) - - node['class'] = "note note-#{node_type}" - node['data-type'] = node_type end doc diff --git a/lib/docs/filters/jekyll/entries.rb b/lib/docs/filters/jekyll/entries.rb index cf6b34b2..fd8be9ac 100644 --- a/lib/docs/filters/jekyll/entries.rb +++ b/lib/docs/filters/jekyll/entries.rb @@ -1,13 +1,12 @@ module Docs class Jekyll class EntriesFilter < Docs::EntriesFilter - def get_name at_css('h1').content end def get_type - if /continuous-integration/.match(slug) + if slug.include?('continuous-integration') 'Deployment' else nav_link = doc.document # document diff --git a/lib/docs/scrapers/jekyll.rb b/lib/docs/scrapers/jekyll.rb index 988e77bd..1faaa9de 100644 --- a/lib/docs/scrapers/jekyll.rb +++ b/lib/docs/scrapers/jekyll.rb @@ -1,7 +1,7 @@ module Docs class Jekyll < UrlScraper self.type = 'jekyll' - self.release = '3.6.2' + self.release = '3.7.2' self.base_url = 'https://jekyllrb.com/docs/' self.root_path = 'home/' self.links = { @@ -12,23 +12,21 @@ module Docs html_filters.push 'jekyll/clean_html', 'jekyll/entries' options[:trailing_slash] = true - options[:container] = 'article' - options[:skip] = [ - '', - '/' - ] + options[:skip] = %w(sites/ upgrading/) options[:skip_patterns] = [ /conduct/, /history/, /maintaining/, - /contributing/ + /contributing/, ] + options[:replace_paths] = { + '' => 'home/', + '/' => 'home/' + } + options[:attribution] = <<-HTML - © 2008–2017 Tom Preston-Werner and Jekyll contributors...
...
...
- Licensed under - - the MIT license - + © 2008–2018 Tom Preston-Werner and Jekyll contributors
+ Licensed under the MIT license. HTML end end diff --git a/public/icons/docs/jekyll/16.png b/public/icons/docs/jekyll/16.png index aeb20c40..5ed82ea0 100644 Binary files a/public/icons/docs/jekyll/16.png and b/public/icons/docs/jekyll/16.png differ diff --git a/public/icons/docs/jekyll/16@2x.png b/public/icons/docs/jekyll/16@2x.png index 1bf8b58f..5abb9560 100644 Binary files a/public/icons/docs/jekyll/16@2x.png and b/public/icons/docs/jekyll/16@2x.png differ diff --git a/public/icons/docs/jekyll/SOURCE b/public/icons/docs/jekyll/SOURCE index 18496fca..ddde1516 100644 --- a/public/icons/docs/jekyll/SOURCE +++ b/public/icons/docs/jekyll/SOURCE @@ -1 +1 @@ -https://avatars3.githubusercontent.com/u/3083652 +https://raw.githubusercontent.com/jekyll/jekyll/master/docs/favicon.ico