[devdocsgjs/main: 1198/1867] Update Jekyll documentation




commit e0100dd133004673f136640a1ccbe5685a65da21
Author: Phil Scherer <pnscher evoforge org>
Date:   Tue Nov 17 23:09:11 2020 +0000

    Update Jekyll documentation

 .../javascripts/templates/pages/about_tmpl.coffee  |  2 +-
 lib/docs/filters/jekyll/entries.rb                 | 34 +++++++++++++++++++---
 lib/docs/scrapers/jekyll.rb                        |  9 +++---
 3 files changed, 35 insertions(+), 10 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee 
b/assets/javascripts/templates/pages/about_tmpl.coffee
index 000ae40e..07aa4106 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -378,7 +378,7 @@ credits = [
     'https://raw.githubusercontent.com/jasmine/jasmine/master/MIT.LICENSE'
   ], [
     'Jekyll',
-    '2008-2018 Tom Preston-Werner and Jekyll contributors',
+    '2020 Jekyll Core Team and contributors',
     'MIT',
     'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE'
   ], [
diff --git a/lib/docs/filters/jekyll/entries.rb b/lib/docs/filters/jekyll/entries.rb
index fd8be9ac..136ee54f 100644
--- a/lib/docs/filters/jekyll/entries.rb
+++ b/lib/docs/filters/jekyll/entries.rb
@@ -1,13 +1,35 @@
 module Docs
   class Jekyll
     class EntriesFilter < Docs::EntriesFilter
+      # Information for which high-level category a page belongs to only exists
+      # on the first level hierarchy. Beyond that, we have to use slug.
+      TYPE_BY_DIR = {
+        'installation' => 'Getting Started',
+        'community' => 'Getting Started',
+
+        'usage' => 'Build',
+        'configuration' => 'Build',
+        'rendering-process' => 'Build',
+
+        'liquid' => 'Site Structure',
+
+        'plugins' => 'Guides',
+        'deployment' => 'Guides',
+
+        'continuous-integration' => 'Deployment'
+      }
+
       def get_name
-        at_css('h1').content
+        if slug.split('/').first == 'step-by-step'
+          at_css('h2').content
+        else
+          at_css('h1').content
+        end
       end
 
       def get_type
-        if slug.include?('continuous-integration')
-          'Deployment'
+        if slug.split('/').first == 'step-by-step'
+          'Tutorial'
         else
           nav_link = doc.document # document
             .at_css('aside li.current') # item in navbar
@@ -18,7 +40,11 @@ module Docs
               .previous_element # header before <ul>
               .content # category
           else
-            'Miscellaneous'
+            if TYPE_BY_DIR.key?(slug.split('/').first)
+              TYPE_BY_DIR[slug.split('/').first]
+            else
+              'Miscellaneous'
+            end
           end
         end
       end
diff --git a/lib/docs/scrapers/jekyll.rb b/lib/docs/scrapers/jekyll.rb
index 500eee10..b53eea26 100644
--- a/lib/docs/scrapers/jekyll.rb
+++ b/lib/docs/scrapers/jekyll.rb
@@ -1,9 +1,9 @@
 module Docs
   class Jekyll < UrlScraper
     self.type = 'jekyll'
-    self.release = '3.7.2'
+    self.release = '4.1.1'
     self.base_url = 'https://jekyllrb.com/docs/'
-    self.root_path = 'home/'
+    self.root_path = 'index.html'
     self.links = {
       home: 'https://jekyllrb.com/',
       code: 'https://github.com/jekyll/jekyll'
@@ -20,12 +20,11 @@ module Docs
       /contributing/,
     ]
     options[:replace_paths] = {
-      '' => 'home/',
-      '/' => 'home/'
+      'templates/' => 'liquid/'
     }
 
     options[:attribution] = <<-HTML
-      &copy; 2008&ndash;2018 Tom Preston-Werner and Jekyll contributors<br>
+      &copy; 2020 Jekyll Core Team and contributors<br>
       Licensed under the MIT license.
     HTML
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]