jekyll-theme-zer0 1.28.0 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1143 -13
  3. data/_data/README.md +2 -0
  4. data/_data/ai.yml +5 -3
  5. data/_data/ai_pricing.yml +36 -0
  6. data/_data/backlog.yml +507 -2
  7. data/_data/consumers.yml +157 -9
  8. data/_data/features.yml +303 -20
  9. data/_data/feedback_types.yml +17 -12
  10. data/_data/i18n/fr.yml +12 -7
  11. data/_data/i18n/manifest.yml +39 -12
  12. data/_data/ingredient_densities.yml +122 -0
  13. data/_data/landing.yml +5 -2
  14. data/_data/navigation/main.yml +16 -0
  15. data/_data/navigation/quickstart.yml +4 -0
  16. data/_data/recipe_courses.yml +64 -0
  17. data/_data/site_builder.yml +874 -0
  18. data/_data/theme-manifest.yml +160 -124
  19. data/_data/ui-text.yml +26 -0
  20. data/_includes/README.md +26 -2
  21. data/_includes/analytics/posthog.html +2 -2
  22. data/_includes/components/admin-links.html +2 -2
  23. data/_includes/components/admin-tabs.html +2 -2
  24. data/_includes/components/ai-chat.html +14 -11
  25. data/_includes/components/analytics-dashboard.html +8 -8
  26. data/_includes/components/author-bio.html +1 -1
  27. data/_includes/components/author-card.html +10 -2
  28. data/_includes/components/author-eeat.html +4 -4
  29. data/_includes/components/background-customizer.html +10 -10
  30. data/_includes/components/background-image.html +114 -0
  31. data/_includes/components/background-settings.html +28 -15
  32. data/_includes/components/collection-manager.html +5 -5
  33. data/_includes/components/component-showcase.html +13 -13
  34. data/_includes/components/config-editor.html +12 -12
  35. data/_includes/components/config-viewer.html +8 -8
  36. data/_includes/components/cookie-consent.html +15 -15
  37. data/_includes/components/cta-button.html +7 -2
  38. data/_includes/components/dev-shortcuts.html +7 -7
  39. data/_includes/components/env-dashboard.html +8 -8
  40. data/_includes/components/env-switcher.html +9 -9
  41. data/_includes/components/feature-card.html +2 -2
  42. data/_includes/components/halfmoon.html +2 -2
  43. data/_includes/components/info-section.html +42 -37
  44. data/_includes/components/js-cdn.html +15 -15
  45. data/_includes/components/language-toggle.html +168 -21
  46. data/_includes/components/mermaid.html +72 -435
  47. data/_includes/components/nanobar.html +5 -5
  48. data/_includes/components/nav-editor.html +2 -2
  49. data/_includes/components/nav-export.html +2 -2
  50. data/_includes/components/nav-overview.html +2 -2
  51. data/_includes/components/page-feedback.html +45 -30
  52. data/_includes/components/page-views-init.html +55 -0
  53. data/_includes/components/page-views.html +33 -0
  54. data/_includes/components/post-card.html +22 -22
  55. data/_includes/components/post-type-badge.html +2 -2
  56. data/_includes/components/powered-by.html +2 -2
  57. data/_includes/components/preview-image.html +6 -0
  58. data/_includes/components/quick-index.html +2 -2
  59. data/_includes/components/recipe-card.html +67 -0
  60. data/_includes/components/recipe-duration.html +50 -0
  61. data/_includes/components/recipe-grams.html +58 -0
  62. data/_includes/components/recipe-index.html +96 -0
  63. data/_includes/components/recipe-ingredients.html +90 -0
  64. data/_includes/components/recipe-meta.html +96 -0
  65. data/_includes/components/recipe-nutrition.html +57 -0
  66. data/_includes/components/recipe-qty.html +73 -0
  67. data/_includes/components/recipe-ratio.html +151 -0
  68. data/_includes/components/recipe-scaler.html +73 -0
  69. data/_includes/components/recipe-steps.html +86 -0
  70. data/_includes/components/recipe-temp.html +45 -0
  71. data/_includes/components/search-modal.html +29 -4
  72. data/_includes/components/searchbar.html +2 -2
  73. data/_includes/components/shortcuts-modal.html +3 -0
  74. data/_includes/components/svg-background.html +2 -2
  75. data/_includes/components/theme-customizer.html +2 -2
  76. data/_includes/components/theme-info.html +14 -7
  77. data/_includes/components/theme-preview-gallery.html +22 -22
  78. data/_includes/content/giscus.html +2 -2
  79. data/_includes/content/intro.html +8 -8
  80. data/_includes/content/jsonld-faq.html +2 -2
  81. data/_includes/content/jsonld-software.html +24 -5
  82. data/_includes/content/seo.html +4 -4
  83. data/_includes/content/sitemap.html +27 -27
  84. data/_includes/content/toc.html +183 -183
  85. data/_includes/core/branding.html +6 -6
  86. data/_includes/core/console-capture.html +32 -74
  87. data/_includes/core/favicon.html +49 -7
  88. data/_includes/core/footer-fabs.html +17 -3
  89. data/_includes/core/footer.html +49 -34
  90. data/_includes/core/head.html +110 -86
  91. data/_includes/core/header.html +76 -54
  92. data/_includes/docs/bootstrap-docs.html +8 -8
  93. data/_includes/landing/landing-install-cards.html +2 -2
  94. data/_includes/landing/landing-quick-links.html +1 -1
  95. data/_includes/navigation/admin-nav.html +2 -2
  96. data/_includes/navigation/nav-tree.html +8 -8
  97. data/_includes/navigation/navbar.html +12 -12
  98. data/_includes/navigation/section-sidebar.html +109 -27
  99. data/_includes/navigation/sidebar-config.html +36 -2
  100. data/_includes/navigation/sidebar-left.html +17 -16
  101. data/_includes/navigation/sidebar-right.html +8 -7
  102. data/_includes/obsidian/full-graph.html +2 -2
  103. data/_includes/setup/claude-session.html +72 -0
  104. data/_includes/setup/prereq-checklist.html +90 -0
  105. data/_includes/setup/wizard.html +924 -222
  106. data/_includes/stats/stats-categories.html +8 -8
  107. data/_includes/stats/stats-header.html +14 -14
  108. data/_includes/stats/stats-metrics.html +14 -14
  109. data/_includes/stats/stats-no-data.html +12 -12
  110. data/_includes/stats/stats-overview.html +6 -6
  111. data/_includes/stats/stats-tags.html +8 -8
  112. data/_layouts/404.html +38 -24
  113. data/_layouts/README.md +2 -0
  114. data/_layouts/admin.html +24 -24
  115. data/_layouts/article.html +43 -33
  116. data/_layouts/author.html +20 -20
  117. data/_layouts/authors.html +2 -2
  118. data/_layouts/book-abc.html +12 -12
  119. data/_layouts/book-story.html +15 -15
  120. data/_layouts/book.html +12 -12
  121. data/_layouts/collection.html +33 -33
  122. data/_layouts/cookbook.html +88 -0
  123. data/_layouts/default.html +31 -28
  124. data/_layouts/home.html +23 -23
  125. data/_layouts/index.html +10 -10
  126. data/_layouts/landing.html +17 -17
  127. data/_layouts/news.html +44 -44
  128. data/_layouts/note.html +38 -38
  129. data/_layouts/notebook.html +34 -34
  130. data/_layouts/recipe.html +274 -0
  131. data/_layouts/root.html +92 -55
  132. data/_layouts/section.html +62 -33
  133. data/_layouts/setup.html +3 -3
  134. data/_layouts/sitemap-collection.html +49 -49
  135. data/_layouts/stats.html +40 -40
  136. data/_layouts/tag.html +12 -12
  137. data/_layouts/welcome.html +21 -21
  138. data/_sass/components/_callout.scss +1 -1
  139. data/_sass/components/_footer.scss +37 -1
  140. data/_sass/components/_mermaid.scss +375 -0
  141. data/_sass/components/_page-views.scss +36 -0
  142. data/_sass/components/_recipe.scss +506 -0
  143. data/_sass/components/_setup-wizard.scss +764 -0
  144. data/_sass/components/_ui-enhancements.scss +6 -6
  145. data/_sass/core/_navbar.scss +261 -46
  146. data/_sass/layouts/_landing.scss +2 -2
  147. data/_sass/layouts/_navbar-extras.scss +14 -4
  148. data/_sass/tokens/_color.scss +6 -0
  149. data/_sass/tokens/_index.scss +2 -0
  150. data/_sass/tokens/_radius.scss +21 -0
  151. data/_sass/tokens/_typography.scss +4 -0
  152. data/_sass/utilities/_focus.scss +14 -0
  153. data/assets/css/main.scss +4 -0
  154. data/assets/js/ai-chat.js +47 -5
  155. data/assets/js/fleet-feedback-capture.js +124 -0
  156. data/assets/js/fleet-feedback.js +853 -0
  157. data/assets/js/mermaid-diagrams.js +1267 -0
  158. data/assets/js/modules/navigation/config.js +9 -6
  159. data/assets/js/modules/navigation/navbar.js +55 -0
  160. data/assets/js/modules/navigation/scroll-spy.js +315 -80
  161. data/assets/js/modules/theme/appearance.js +8 -2
  162. data/assets/js/obsidian-wiki-links.js +8 -3
  163. data/assets/js/page-feedback.js +125 -192
  164. data/assets/js/page-views.js +372 -0
  165. data/assets/js/recipe-scaler.js +501 -0
  166. data/assets/js/search-modal.js +36 -0
  167. data/assets/js/setup-wizard.js +2279 -226
  168. data/assets/js/site-builder.js +1834 -0
  169. data/assets/js/ui-enhancements.js +11 -3
  170. data/scripts/README.md +44 -0
  171. data/scripts/ai/README.md +38 -0
  172. data/scripts/ai/api_call.rb +124 -0
  173. data/scripts/ai/usage.rb +314 -0
  174. data/scripts/ai/usage_report.rb +225 -0
  175. data/scripts/bin/audit-consumer +39 -7
  176. data/scripts/bin/giscus-discussions +213 -14
  177. data/scripts/bin/manifest +35 -12
  178. data/scripts/ci/agent_review_result.py +164 -0
  179. data/scripts/ci/test_agent_review_result.py +172 -0
  180. data/scripts/ci/test_visual_evidence_autogen.py +341 -0
  181. data/scripts/ci/visual_evidence_autogen.py +1060 -0
  182. data/scripts/content-review.rb +20 -1
  183. data/scripts/design-system-check.rb +170 -0
  184. data/scripts/lib/audit.sh +42 -2
  185. data/scripts/lint-liquid-raw.rb +137 -0
  186. data/scripts/test/integration/mermaid +22 -8
  187. data/scripts/test/lib/run_tests.sh +3 -1
  188. data/scripts/test/lib/test_agent_review_result.sh +27 -0
  189. data/scripts/test/lib/test_visual_evidence_autogen.sh +24 -0
  190. data/scripts/translate.rb +94 -16
  191. metadata +48 -2
@@ -1,5 +1,5 @@
1
1
  {% comment %} Features: ZER0-041, ZER0-054 {% endcomment %}
2
- <!--
2
+ {% comment %}
3
3
  ===================================================================
4
4
  SEO SUPPLEMENT - Additional meta tags not covered by jekyll-seo-tag
5
5
  ===================================================================
@@ -22,7 +22,7 @@
22
22
  - jekyll-seo-tag plugin (loaded in _layouts/root.html via seo tags)
23
23
  - site.preview_images config in _config.yml
24
24
  ===================================================================
25
- -->
25
+ {% endcomment %}
26
26
 
27
27
  {%- comment -%}
28
28
  Custom og:image handling: supports page.preview and page.header.og_image
@@ -63,7 +63,7 @@
63
63
  {%- endif -%}
64
64
  {%- endunless -%}
65
65
 
66
- <!-- Site verification (non-Google; Google is handled by jekyll-seo-tag) -->
66
+ {% comment %} Site verification (non-Google; Google is handled by jekyll-seo-tag) {% endcomment %}
67
67
  {% if site.bing_site_verification %}
68
68
  <meta name="msvalidate.01" content="{{ site.bing_site_verification }}">
69
69
  {% endif %}
@@ -79,4 +79,4 @@
79
79
  {% if site.baidu_site_verification %}
80
80
  <meta name="baidu-site-verification" content="{{ site.baidu_site_verification }}">
81
81
  {% endif %}
82
- <!-- end _includes/content/seo.html -->
82
+ {% comment %} end _includes/content/seo.html {% endcomment %}
@@ -1,5 +1,5 @@
1
1
  {% comment %} Feature: ZER0-042 {% endcomment %}
2
- <!--
2
+ {% comment %}
3
3
  ===================================================================
4
4
  SITEMAP COMPONENT - Comprehensive Site Navigation Index
5
5
  ===================================================================
@@ -27,11 +27,11 @@
27
27
  - Export capabilities (future enhancement)
28
28
  - Keyboard navigation support
29
29
  ===================================================================
30
- -->
30
+ {% endcomment %}
31
31
 
32
- <!-- ================================ -->
33
- <!-- SITEMAP OVERVIEW AND STATS -->
34
- <!-- ================================ -->
32
+ {% comment %} ================================ {% endcomment %}
33
+ {% comment %} SITEMAP OVERVIEW AND STATS {% endcomment %}
34
+ {% comment %} ================================ {% endcomment %}
35
35
  <div class="row mb-4">
36
36
  <div class="col-12">
37
37
  <div class="card border-0">
@@ -63,9 +63,9 @@
63
63
  </div>
64
64
  </div>
65
65
 
66
- <!-- ================================ -->
67
- <!-- COLLECTION STATISTICS -->
68
- <!-- ================================ -->
66
+ {% comment %} ================================ {% endcomment %}
67
+ {% comment %} COLLECTION STATISTICS {% endcomment %}
68
+ {% comment %} ================================ {% endcomment %}
69
69
  <div class="row mb-4 d-none" id="statsSection">
70
70
  <div class="col-12">
71
71
  <div class="card">
@@ -77,22 +77,22 @@
77
77
  </div>
78
78
  <div class="card-body">
79
79
  <div class="row" id="collectionStats">
80
- <!-- Dynamic collection statistics will be inserted here -->
80
+ {% comment %} Dynamic collection statistics will be inserted here {% endcomment %}
81
81
  </div>
82
82
  </div>
83
83
  </div>
84
84
  </div>
85
85
  </div>
86
86
 
87
- <!-- ================================ -->
88
- <!-- SEARCH AND FILTER CONTROLS -->
89
- <!-- ================================ -->
87
+ {% comment %} ================================ {% endcomment %}
88
+ {% comment %} SEARCH AND FILTER CONTROLS {% endcomment %}
89
+ {% comment %} ================================ {% endcomment %}
90
90
  <div class="row mb-4">
91
91
  <div class="col-12">
92
92
  <div class="card">
93
93
  <div class="card-body">
94
94
  <div class="row g-3">
95
- <!-- Search Input -->
95
+ {% comment %} Search Input {% endcomment %}
96
96
  <div class="col-md-6">
97
97
  <label for="searchBar" class="form-label">
98
98
  <i class="bi bi-search"></i> Search Content
@@ -116,18 +116,18 @@
116
116
  </div>
117
117
  </div>
118
118
 
119
- <!-- Collection Filter -->
119
+ {% comment %} Collection Filter {% endcomment %}
120
120
  <div class="col-md-3">
121
121
  <label for="collectionFilter" class="form-label">
122
122
  <i class="bi bi-funnel"></i> Filter by Collection
123
123
  </label>
124
124
  <select class="form-select" id="collectionFilter">
125
125
  <option value="">All Collections</option>
126
- <!-- Dynamic options will be added by JavaScript -->
126
+ {% comment %} Dynamic options will be added by JavaScript {% endcomment %}
127
127
  </select>
128
128
  </div>
129
129
 
130
- <!-- Date Range Filter -->
130
+ {% comment %} Date Range Filter {% endcomment %}
131
131
  <div class="col-md-3">
132
132
  <label for="dateFilter" class="form-label">
133
133
  <i class="bi bi-calendar-range"></i> Date Range
@@ -142,7 +142,7 @@
142
142
  </div>
143
143
  </div>
144
144
 
145
- <!-- Results Counter -->
145
+ {% comment %} Results Counter {% endcomment %}
146
146
  <div class="row mt-3">
147
147
  <div class="col-12">
148
148
  <div class="d-flex justify-content-between align-items-center">
@@ -168,9 +168,9 @@
168
168
  </div>
169
169
  </div>
170
170
 
171
- <!-- ================================ -->
172
- <!-- RESPONSIVE DATA TABLE -->
173
- <!-- ================================ -->
171
+ {% comment %} ================================ {% endcomment %}
172
+ {% comment %} RESPONSIVE DATA TABLE {% endcomment %}
173
+ {% comment %} ================================ {% endcomment %}
174
174
  <div class="row" id="tableViewContainer">
175
175
  <div class="col-12">
176
176
  <div class="card">
@@ -365,20 +365,20 @@
365
365
  </div>
366
366
  </div>
367
367
 
368
- <!-- ================================ -->
369
- <!-- CARDS VIEW CONTAINER -->
370
- <!-- ================================ -->
368
+ {% comment %} ================================ {% endcomment %}
369
+ {% comment %} CARDS VIEW CONTAINER {% endcomment %}
370
+ {% comment %} ================================ {% endcomment %}
371
371
  <div class="row d-none" id="cardViewContainer">
372
372
  <div class="col-12">
373
373
  <div id="sitemapCardsContainer" class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 g-4">
374
- <!-- Cards will be dynamically generated here -->
374
+ {% comment %} Cards will be dynamically generated here {% endcomment %}
375
375
  </div>
376
376
  </div>
377
377
  </div>
378
378
 
379
- <!-- ================================ -->
380
- <!-- ENHANCED SITEMAP FUNCTIONALITY -->
381
- <!-- ================================ -->
379
+ {% comment %} ================================ {% endcomment %}
380
+ {% comment %} ENHANCED SITEMAP FUNCTIONALITY {% endcomment %}
381
+ {% comment %} ================================ {% endcomment %}
382
382
  <style>
383
383
  /* Custom Sitemap Styles */
384
384
  .sitemap-col-collection { min-width: 120px; }
@@ -1,183 +1,183 @@
1
- {% comment %} Feature: ZER0-037 {% endcomment %}
2
- {% capture tocWorkspace %}
3
- {% comment %}
4
- Copyright (c) 2017 Vladimir "allejo" Jimenez
5
-
6
- Permission is hereby granted, free of charge, to any person
7
- obtaining a copy of this software and associated documentation
8
- files (the "Software"), to deal in the Software without
9
- restriction, including without limitation the rights to use,
10
- copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the
12
- Software is furnished to do so, subject to the following
13
- conditions:
14
-
15
- The above copyright notice and this permission notice shall be
16
- included in all copies or substantial portions of the Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25
- OTHER DEALINGS IN THE SOFTWARE.
26
- {% endcomment %}
27
- {% comment %}
28
- Version 1.1.0
29
- https://github.com/allejo/jekyll-toc
30
-
31
- "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
32
-
33
- Usage:
34
- {% include content/toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
35
-
36
- Parameters:
37
- * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
38
-
39
- Optional Parameters:
40
- * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
41
- * class (string) : '' - a CSS class assigned to the TOC
42
- * id (string) : '' - an ID to assigned to the TOC
43
- * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
44
- * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
45
- * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
46
- * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
47
- * submenu_class (string) : '' - add custom class(es) for each child group of headings; has support for '%level%' placeholder which is the current "submenu" heading level
48
- * base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
49
- * anchor_class (string) : '' - add custom class(es) for each anchor element
50
- * skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
51
-
52
- Output:
53
- An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
54
- generate the table of contents and will NOT output the markdown given to it
55
- {% endcomment %}
56
-
57
- {% capture newline %}
58
- {% endcapture %}
59
- {% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->
60
-
61
- {% capture deprecation_warnings %}{% endcapture %}
62
-
63
- {% if include.baseurl %}
64
- {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead -->{{ newline }}{% endcapture %}
65
- {% endif %}
66
-
67
- {% if include.skipNoIDs %}
68
- {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead -->{{ newline }}{% endcapture %}
69
- {% endif %}
70
-
71
- {% capture jekyll_toc %}{% endcapture %}
72
- {% assign orderedList = include.ordered | default: false %}
73
- {% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
74
- {% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
75
- {% assign minHeader = include.h_min | default: 1 %}
76
- {% assign maxHeader = include.h_max | default: 6 %}
77
- {% assign nodes = include.html | strip | split: '<h' %}
78
-
79
- {% assign firstHeader = true %}
80
- {% assign currLevel = 0 %}
81
- {% assign lastLevel = 0 %}
82
-
83
- {% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
84
-
85
- {% for node in nodes %}
86
- {% if node == "" %}
87
- {% continue %}
88
- {% endif %}
89
-
90
- {% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
91
-
92
- {% if currLevel < minHeader or currLevel > maxHeader %}
93
- {% continue %}
94
- {% endif %}
95
-
96
- {% assign _workspace = node | split: '</h' %}
97
-
98
- {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
99
- {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
100
- {% assign htmlID = _idWorkspace[0] %}
101
-
102
- {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
103
- {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
104
- {% assign htmlClass = _classWorkspace[0] %}
105
-
106
- {% if htmlClass contains "no_toc" %}
107
- {% continue %}
108
- {% endif %}
109
-
110
- {% if firstHeader %}
111
- {% assign minHeader = currLevel %}
112
- {% endif %}
113
-
114
- {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
115
- {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
116
-
117
- {% if include.item_class and include.item_class != blank %}
118
- {% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
119
- {% endif %}
120
-
121
- {% if include.submenu_class and include.submenu_class != blank %}
122
- {% assign subMenuLevel = currLevel | minus: 1 %}
123
- {% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
124
- {% endif %}
125
-
126
- {% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
127
-
128
- {% if htmlID %}
129
- {% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
130
-
131
- {% if include.anchor_class %}
132
- {% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
133
- {% endif %}
134
-
135
- {% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
136
- {% elsif skipNoIDs == true %}
137
- {% continue %}
138
- {% else %}
139
- {% capture listItem %}{{ anchorBody }}{% endcapture %}
140
- {% endif %}
141
-
142
- {% if currLevel > lastLevel %}
143
- {% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
144
- {% elsif currLevel < lastLevel %}
145
- {% assign repeatCount = lastLevel | minus: currLevel %}
146
-
147
- {% for i in (1..repeatCount) %}
148
- {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
149
- {% endfor %}
150
-
151
- {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
152
- {% else %}
153
- {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
154
- {% endif %}
155
-
156
- {% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
157
-
158
- {% assign lastLevel = currLevel %}
159
- {% assign firstHeader = false %}
160
- {% endfor %}
161
-
162
- {% assign repeatCount = minHeader | minus: 1 %}
163
- {% assign repeatCount = lastLevel | minus: repeatCount %}
164
- {% for i in (1..repeatCount) %}
165
- {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
166
- {% endfor %}
167
-
168
- {% if jekyll_toc != '' %}
169
- {% assign rootAttributes = '' %}
170
- {% if include.class and include.class != blank %}
171
- {% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
172
- {% endif %}
173
-
174
- {% if include.id and include.id != blank %}
175
- {% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
176
- {% endif %}
177
-
178
- {% if rootAttributes %}
179
- {% assign nodes = jekyll_toc | split: '>' %}
180
- {% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
181
- {% endif %}
182
- {% endif %}
183
- {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}
1
+ {% comment %} Feature: ZER0-037 {% endcomment %}
2
+ {% capture tocWorkspace %}
3
+ {% comment %}
4
+ Copyright (c) 2017 Vladimir "allejo" Jimenez
5
+
6
+ Permission is hereby granted, free of charge, to any person
7
+ obtaining a copy of this software and associated documentation
8
+ files (the "Software"), to deal in the Software without
9
+ restriction, including without limitation the rights to use,
10
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the
12
+ Software is furnished to do so, subject to the following
13
+ conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25
+ OTHER DEALINGS IN THE SOFTWARE.
26
+ {% endcomment %}
27
+ {% comment %}
28
+ Version 1.1.0
29
+ https://github.com/allejo/jekyll-toc
30
+
31
+ "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
32
+
33
+ Usage:
34
+ {% include content/toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
35
+
36
+ Parameters:
37
+ * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
38
+
39
+ Optional Parameters:
40
+ * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
41
+ * class (string) : '' - a CSS class assigned to the TOC
42
+ * id (string) : '' - an ID to assigned to the TOC
43
+ * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
44
+ * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
45
+ * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
46
+ * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
47
+ * submenu_class (string) : '' - add custom class(es) for each child group of headings; has support for '%level%' placeholder which is the current "submenu" heading level
48
+ * base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
49
+ * anchor_class (string) : '' - add custom class(es) for each anchor element
50
+ * skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
51
+
52
+ Output:
53
+ An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
54
+ generate the table of contents and will NOT output the markdown given to it
55
+ {% endcomment %}
56
+
57
+ {% capture newline %}
58
+ {% endcapture %}
59
+ {% assign newline = newline | rstrip %} {% comment %} Remove the extra spacing but preserve the newline {% endcomment %}
60
+
61
+ {% capture deprecation_warnings %}{% endcapture %}
62
+
63
+ {% if include.baseurl %}
64
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}{% comment %} jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead {% endcomment %}{{ newline }}{% endcapture %}
65
+ {% endif %}
66
+
67
+ {% if include.skipNoIDs %}
68
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}{% comment %} jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead {% endcomment %}{{ newline }}{% endcapture %}
69
+ {% endif %}
70
+
71
+ {% capture jekyll_toc %}{% endcapture %}
72
+ {% assign orderedList = include.ordered | default: false %}
73
+ {% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
74
+ {% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
75
+ {% assign minHeader = include.h_min | default: 1 %}
76
+ {% assign maxHeader = include.h_max | default: 6 %}
77
+ {% assign nodes = include.html | strip | split: '<h' %}
78
+
79
+ {% assign firstHeader = true %}
80
+ {% assign currLevel = 0 %}
81
+ {% assign lastLevel = 0 %}
82
+
83
+ {% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
84
+
85
+ {% for node in nodes %}
86
+ {% if node == "" %}
87
+ {% continue %}
88
+ {% endif %}
89
+
90
+ {% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
91
+
92
+ {% if currLevel < minHeader or currLevel > maxHeader %}
93
+ {% continue %}
94
+ {% endif %}
95
+
96
+ {% assign _workspace = node | split: '</h' %}
97
+
98
+ {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
99
+ {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
100
+ {% assign htmlID = _idWorkspace[0] %}
101
+
102
+ {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
103
+ {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
104
+ {% assign htmlClass = _classWorkspace[0] %}
105
+
106
+ {% if htmlClass contains "no_toc" %}
107
+ {% continue %}
108
+ {% endif %}
109
+
110
+ {% if firstHeader %}
111
+ {% assign minHeader = currLevel %}
112
+ {% endif %}
113
+
114
+ {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
115
+ {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
116
+
117
+ {% if include.item_class and include.item_class != blank %}
118
+ {% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
119
+ {% endif %}
120
+
121
+ {% if include.submenu_class and include.submenu_class != blank %}
122
+ {% assign subMenuLevel = currLevel | minus: 1 %}
123
+ {% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
124
+ {% endif %}
125
+
126
+ {% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
127
+
128
+ {% if htmlID %}
129
+ {% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
130
+
131
+ {% if include.anchor_class %}
132
+ {% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
133
+ {% endif %}
134
+
135
+ {% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
136
+ {% elsif skipNoIDs == true %}
137
+ {% continue %}
138
+ {% else %}
139
+ {% capture listItem %}{{ anchorBody }}{% endcapture %}
140
+ {% endif %}
141
+
142
+ {% if currLevel > lastLevel %}
143
+ {% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
144
+ {% elsif currLevel < lastLevel %}
145
+ {% assign repeatCount = lastLevel | minus: currLevel %}
146
+
147
+ {% for i in (1..repeatCount) %}
148
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
149
+ {% endfor %}
150
+
151
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
152
+ {% else %}
153
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
154
+ {% endif %}
155
+
156
+ {% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
157
+
158
+ {% assign lastLevel = currLevel %}
159
+ {% assign firstHeader = false %}
160
+ {% endfor %}
161
+
162
+ {% assign repeatCount = minHeader | minus: 1 %}
163
+ {% assign repeatCount = lastLevel | minus: repeatCount %}
164
+ {% for i in (1..repeatCount) %}
165
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
166
+ {% endfor %}
167
+
168
+ {% if jekyll_toc != '' %}
169
+ {% assign rootAttributes = '' %}
170
+ {% if include.class and include.class != blank %}
171
+ {% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
172
+ {% endif %}
173
+
174
+ {% if include.id and include.id != blank %}
175
+ {% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
176
+ {% endif %}
177
+
178
+ {% if rootAttributes %}
179
+ {% assign nodes = jekyll_toc | split: '>' %}
180
+ {% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
181
+ {% endif %}
182
+ {% endif %}
183
+ {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}
@@ -1,4 +1,4 @@
1
- <!--
1
+ {% comment %}
2
2
  ===================================================================
3
3
  BRANDING - Site Title and Subtitle Display
4
4
  ===================================================================
@@ -14,8 +14,8 @@
14
14
  - site.title_icon: Icon for title display
15
15
  - site.subtitle_icon: Icon for subtitle display
16
16
  ===================================================================
17
- -->
18
- <!-- Color Schema Override
17
+ {% endcomment %}
18
+ {% comment %} Color Schema Override
19
19
  TODO: Add a poline plug-in to generate color scheme
20
20
  https://meodai.github.io/poline/
21
21
 
@@ -28,9 +28,9 @@
28
28
  Yellow - #ffe900
29
29
  Teal - #376986
30
30
  Blue - #007bff
31
- -->
31
+ {% endcomment %}
32
32
 
33
- <!-- Title Section -->
33
+ {% comment %} Title Section {% endcomment %}
34
34
 
35
35
  <div class="navbar-brand site-title mb-0 py-0 me-0 min-w-0 flex-grow-1">
36
36
  <a
@@ -43,7 +43,7 @@
43
43
  </a>
44
44
  </div>
45
45
 
46
- <!-- If a subtitle exists -->
46
+ {% comment %} If a subtitle exists {% endcomment %}
47
47
  {%- assign _subtitle = site.subtitle | strip -%}
48
48
  {%- if _subtitle != "" -%}
49
49
  <div class="navbar-brand site-subtitle d-none d-lg-inline">