databook-theme 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +21 -21
  3. data/README.MD +1 -1
  4. data/_includes/blog/blog.liquid +50 -50
  5. data/_includes/blog/features.liquid +36 -36
  6. data/_includes/blog/full.liquid +3 -3
  7. data/_includes/blog/list.liquid +41 -41
  8. data/_includes/blog/post.liquid +6 -6
  9. data/_includes/components/analytics.google.liquid +11 -11
  10. data/_includes/components/analytics.liquid +11 -11
  11. data/_includes/components/comments.disqus.liquid +17 -17
  12. data/_includes/components/comments.gitalk.liquid +22 -22
  13. data/_includes/components/comments.liquid +13 -13
  14. data/_includes/components/navmenu.items.liquid +51 -51
  15. data/_includes/components/navmenu.liquid +4 -4
  16. data/_includes/components/pagination.liquid +83 -83
  17. data/_includes/components/prevnext.liquid +1 -1
  18. data/_includes/components/search.baidu.liquid +7 -7
  19. data/_includes/components/search.bing.liquid +6 -6
  20. data/_includes/components/search.google.liquid +6 -6
  21. data/_includes/components/search.liquid +21 -21
  22. data/_includes/components/social_button.liquid +9 -9
  23. data/_includes/components/social_link.liquid +14 -14
  24. data/_includes/components/title.liquid +41 -41
  25. data/_includes/components/toc.liquid +28 -28
  26. data/_includes/custom/analytics.liquid +3 -3
  27. data/_includes/custom/blog.liquid +3 -3
  28. data/_includes/custom/body.liquid +3 -3
  29. data/_includes/custom/comments.liquid +3 -3
  30. data/_includes/custom/favicon.liquid +11 -0
  31. data/_includes/custom/footer.liquid +3 -3
  32. data/_includes/custom/head.liquid +3 -3
  33. data/_includes/custom/katex.liquid +15 -15
  34. data/_includes/custom/mathjax.liquid +19 -19
  35. data/_includes/custom/search.liquid +3 -3
  36. data/_includes/extensions/toc.liquid +182 -182
  37. data/_includes/functions/get_config.liquid +11 -11
  38. data/_includes/functions/get_config_data.liquid +23 -23
  39. data/_includes/functions/get_icon.liquid +5 -5
  40. data/_includes/functions/get_page_meta.liquid +74 -60
  41. data/_includes/functions/get_page_thumbnail.liquid +22 -23
  42. data/_includes/functions/get_page_title.liquid +7 -7
  43. data/_includes/functions/get_recent_posts.liquid +17 -17
  44. data/_includes/functions/get_taxonomy_link.liquid +9 -9
  45. data/_includes/head/head.liquid +11 -12
  46. data/_includes/head/meta.liquid +50 -41
  47. data/_includes/head/requirements.liquid +87 -87
  48. data/_includes/head/styles.liquid +10 -10
  49. data/_includes/js/codes.js +116 -116
  50. data/_includes/js/scrollspy.js +16 -16
  51. data/_includes/layout/article.liquid +74 -71
  52. data/_includes/layout/footer.liquid +53 -53
  53. data/_includes/layout/header.liquid +31 -31
  54. data/_includes/layout/hero.liquid +29 -29
  55. data/_includes/layout/page.liquid +33 -33
  56. data/_includes/layout/pagehead.liquid +17 -17
  57. data/_includes/layout/sidebar.liquid +178 -178
  58. data/_includes/localize +29 -29
  59. data/_includes/notice +6 -6
  60. data/_includes/version +1 -1
  61. data/_layouts/article.liquid +10 -10
  62. data/_layouts/default.liquid +132 -131
  63. data/_layouts/home.liquid +20 -20
  64. data/_layouts/page.liquid +9 -9
  65. data/_layouts/post.liquid +9 -9
  66. data/_layouts/system.liquid +35 -35
  67. data/_layouts/taxonomy.liquid +67 -67
  68. data/_sass/_databook.scss +42 -42
  69. data/_sass/_debug.scss +7 -7
  70. data/_sass/_variables.scss +24 -24
  71. data/_sass/base/_mixins.scss +32 -32
  72. data/_sass/base/_normalize.scss +45 -45
  73. data/_sass/base/_responsive.scss +28 -28
  74. data/_sass/components/_archive.scss +49 -49
  75. data/_sass/components/_blog.scss +249 -249
  76. data/_sass/components/_forms.scss +30 -30
  77. data/_sass/components/_hero.scss +70 -70
  78. data/_sass/components/_misc.scss +3 -3
  79. data/_sass/components/_notice.scss +27 -27
  80. data/_sass/components/_notification.scss +10 -10
  81. data/_sass/components/_post.scss +19 -19
  82. data/_sass/components/_sidebar.scss +303 -303
  83. data/_sass/components/_tabs.scss +67 -67
  84. data/_sass/components/_text.scss +27 -27
  85. data/_sass/components/_toc.scss +50 -50
  86. data/_sass/layout/_article.scss +211 -211
  87. data/_sass/layout/_body.scss +26 -26
  88. data/_sass/layout/_footer.scss +75 -75
  89. data/_sass/layout/_header.scss +124 -124
  90. data/_sass/layout/_main.scss +8 -8
  91. data/_sass/layout/_misc.scss +7 -7
  92. data/_sass/layout/_navbar.scss +323 -323
  93. data/_sass/layout/_sidebar.scss +115 -115
  94. data/_sass/layout/_wrapper.scss +7 -7
  95. data/_sass/theme/_scheme.scss +112 -112
  96. data/_sass/typography/_article.scss +49 -49
  97. data/_sass/typography/_doc.scss +104 -104
  98. data/_sass/typography/_highlight.scss +208 -208
  99. data/_sass/typography/_markdown.scss +18 -18
  100. data/_sass/typography/_table.scss +119 -119
  101. data/_sass/typography/_typography.scss +103 -108
  102. data/_sass/utilities/_thinscrollbar.scss +35 -35
  103. data/assets/databook/css/databook.scss +6 -6
  104. data/assets/databook/js/databook.js +8 -8
  105. data/assets/databook/js/search.js +47 -47
  106. data/assets/databook/version.json +9 -9
  107. data/assets/search.json +30 -30
  108. metadata +8 -8
  109. data/_includes/head/opengraph.liquid +0 -1
@@ -1,182 +1,182 @@
1
- {% capture tocWorkspace %}
2
- {% comment %}
3
- Copyright (c) 2017 Vladimir "allejo" Jimenez
4
-
5
- Permission is hereby granted, free of charge, to any person
6
- obtaining a copy of this software and associated documentation
7
- files (the "Software"), to deal in the Software without
8
- restriction, including without limitation the rights to use,
9
- copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the
11
- Software is furnished to do so, subject to the following
12
- conditions:
13
-
14
- The above copyright notice and this permission notice shall be
15
- included in all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
- OTHER DEALINGS IN THE SOFTWARE.
25
- {% endcomment %}
26
- {% comment %}
27
- Version 1.1.0
28
- https://github.com/allejo/jekyll-toc
29
-
30
- "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
31
-
32
- Usage:
33
- {% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
34
-
35
- Parameters:
36
- * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
37
-
38
- Optional Parameters:
39
- * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
40
- * class (string) : '' - a CSS class assigned to the TOC
41
- * id (string) : '' - an ID to assigned to the TOC
42
- * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
43
- * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
44
- * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
45
- * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
46
- * 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
47
- * base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
48
- * anchor_class (string) : '' - add custom class(es) for each anchor element
49
- * skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
50
-
51
- Output:
52
- An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
53
- generate the table of contents and will NOT output the markdown given to it
54
- {% endcomment %}
55
-
56
- {% capture newline %}
57
- {% endcapture %}
58
- {% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->
59
-
60
- {% capture deprecation_warnings %}{% endcapture %}
61
-
62
- {% if include.baseurl %}
63
- {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead -->{{ newline }}{% endcapture %}
64
- {% endif %}
65
-
66
- {% if include.skipNoIDs %}
67
- {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead -->{{ newline }}{% endcapture %}
68
- {% endif %}
69
-
70
- {% capture jekyll_toc %}{% endcapture %}
71
- {% assign orderedList = include.ordered | default: false %}
72
- {% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
73
- {% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
74
- {% assign minHeader = include.h_min | default: 1 %}
75
- {% assign maxHeader = include.h_max | default: 6 %}
76
- {% assign nodes = include.html | strip | split: '<h' %}
77
-
78
- {% assign firstHeader = true %}
79
- {% assign currLevel = 0 %}
80
- {% assign lastLevel = 0 %}
81
-
82
- {% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
83
-
84
- {% for node in nodes %}
85
- {% if node == "" %}
86
- {% continue %}
87
- {% endif %}
88
-
89
- {% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
90
-
91
- {% if currLevel < minHeader or currLevel > maxHeader %}
92
- {% continue %}
93
- {% endif %}
94
-
95
- {% assign _workspace = node | split: '</h' %}
96
-
97
- {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
98
- {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
99
- {% assign htmlID = _idWorkspace[0] %}
100
-
101
- {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
102
- {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
103
- {% assign htmlClass = _classWorkspace[0] %}
104
-
105
- {% if htmlClass contains "no_toc" %}
106
- {% continue %}
107
- {% endif %}
108
-
109
- {% if firstHeader %}
110
- {% assign minHeader = currLevel %}
111
- {% endif %}
112
-
113
- {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
114
- {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
115
-
116
- {% if include.item_class and include.item_class != blank %}
117
- {% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
118
- {% endif %}
119
-
120
- {% if include.submenu_class and include.submenu_class != blank %}
121
- {% assign subMenuLevel = currLevel | minus: 1 %}
122
- {% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
123
- {% endif %}
124
-
125
- {% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
126
-
127
- {% if htmlID %}
128
- {% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
129
-
130
- {% if include.anchor_class %}
131
- {% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
132
- {% endif %}
133
-
134
- {% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
135
- {% elsif skipNoIDs == true %}
136
- {% continue %}
137
- {% else %}
138
- {% capture listItem %}{{ anchorBody }}{% endcapture %}
139
- {% endif %}
140
-
141
- {% if currLevel > lastLevel %}
142
- {% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
143
- {% elsif currLevel < lastLevel %}
144
- {% assign repeatCount = lastLevel | minus: currLevel %}
145
-
146
- {% for i in (1..repeatCount) %}
147
- {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
148
- {% endfor %}
149
-
150
- {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
151
- {% else %}
152
- {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
153
- {% endif %}
154
-
155
- {% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
156
-
157
- {% assign lastLevel = currLevel %}
158
- {% assign firstHeader = false %}
159
- {% endfor %}
160
-
161
- {% assign repeatCount = minHeader | minus: 1 %}
162
- {% assign repeatCount = lastLevel | minus: repeatCount %}
163
- {% for i in (1..repeatCount) %}
164
- {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
165
- {% endfor %}
166
-
167
- {% if jekyll_toc != '' %}
168
- {% assign rootAttributes = '' %}
169
- {% if include.class and include.class != blank %}
170
- {% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
171
- {% endif %}
172
-
173
- {% if include.id and include.id != blank %}
174
- {% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
175
- {% endif %}
176
-
177
- {% if rootAttributes %}
178
- {% assign nodes = jekyll_toc | split: '>' %}
179
- {% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
180
- {% endif %}
181
- {% endif %}
182
- {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}
1
+ {% capture tocWorkspace %}
2
+ {% comment %}
3
+ Copyright (c) 2017 Vladimir "allejo" Jimenez
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the "Software"), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
25
+ {% endcomment %}
26
+ {% comment %}
27
+ Version 1.1.0
28
+ https://github.com/allejo/jekyll-toc
29
+
30
+ "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
31
+
32
+ Usage:
33
+ {% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
34
+
35
+ Parameters:
36
+ * html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
37
+
38
+ Optional Parameters:
39
+ * sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
40
+ * class (string) : '' - a CSS class assigned to the TOC
41
+ * id (string) : '' - an ID to assigned to the TOC
42
+ * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
43
+ * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
44
+ * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
45
+ * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
46
+ * 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
47
+ * base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
48
+ * anchor_class (string) : '' - add custom class(es) for each anchor element
49
+ * skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
50
+
51
+ Output:
52
+ An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
53
+ generate the table of contents and will NOT output the markdown given to it
54
+ {% endcomment %}
55
+
56
+ {% capture newline %}
57
+ {% endcapture %}
58
+ {% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->
59
+
60
+ {% capture deprecation_warnings %}{% endcapture %}
61
+
62
+ {% if include.baseurl %}
63
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead -->{{ newline }}{% endcapture %}
64
+ {% endif %}
65
+
66
+ {% if include.skipNoIDs %}
67
+ {% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead -->{{ newline }}{% endcapture %}
68
+ {% endif %}
69
+
70
+ {% capture jekyll_toc %}{% endcapture %}
71
+ {% assign orderedList = include.ordered | default: false %}
72
+ {% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
73
+ {% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
74
+ {% assign minHeader = include.h_min | default: 1 %}
75
+ {% assign maxHeader = include.h_max | default: 6 %}
76
+ {% assign nodes = include.html | strip | split: '<h' %}
77
+
78
+ {% assign firstHeader = true %}
79
+ {% assign currLevel = 0 %}
80
+ {% assign lastLevel = 0 %}
81
+
82
+ {% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
83
+
84
+ {% for node in nodes %}
85
+ {% if node == "" %}
86
+ {% continue %}
87
+ {% endif %}
88
+
89
+ {% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
90
+
91
+ {% if currLevel < minHeader or currLevel > maxHeader %}
92
+ {% continue %}
93
+ {% endif %}
94
+
95
+ {% assign _workspace = node | split: '</h' %}
96
+
97
+ {% assign _idWorkspace = _workspace[0] | split: 'id="' %}
98
+ {% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
99
+ {% assign htmlID = _idWorkspace[0] %}
100
+
101
+ {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
102
+ {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
103
+ {% assign htmlClass = _classWorkspace[0] %}
104
+
105
+ {% if htmlClass contains "no_toc" %}
106
+ {% continue %}
107
+ {% endif %}
108
+
109
+ {% if firstHeader %}
110
+ {% assign minHeader = currLevel %}
111
+ {% endif %}
112
+
113
+ {% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
114
+ {% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
115
+
116
+ {% if include.item_class and include.item_class != blank %}
117
+ {% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
118
+ {% endif %}
119
+
120
+ {% if include.submenu_class and include.submenu_class != blank %}
121
+ {% assign subMenuLevel = currLevel | minus: 1 %}
122
+ {% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
123
+ {% endif %}
124
+
125
+ {% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
126
+
127
+ {% if htmlID %}
128
+ {% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
129
+
130
+ {% if include.anchor_class %}
131
+ {% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
132
+ {% endif %}
133
+
134
+ {% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
135
+ {% elsif skipNoIDs == true %}
136
+ {% continue %}
137
+ {% else %}
138
+ {% capture listItem %}{{ anchorBody }}{% endcapture %}
139
+ {% endif %}
140
+
141
+ {% if currLevel > lastLevel %}
142
+ {% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
143
+ {% elsif currLevel < lastLevel %}
144
+ {% assign repeatCount = lastLevel | minus: currLevel %}
145
+
146
+ {% for i in (1..repeatCount) %}
147
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
148
+ {% endfor %}
149
+
150
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
151
+ {% else %}
152
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
153
+ {% endif %}
154
+
155
+ {% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
156
+
157
+ {% assign lastLevel = currLevel %}
158
+ {% assign firstHeader = false %}
159
+ {% endfor %}
160
+
161
+ {% assign repeatCount = minHeader | minus: 1 %}
162
+ {% assign repeatCount = lastLevel | minus: repeatCount %}
163
+ {% for i in (1..repeatCount) %}
164
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
165
+ {% endfor %}
166
+
167
+ {% if jekyll_toc != '' %}
168
+ {% assign rootAttributes = '' %}
169
+ {% if include.class and include.class != blank %}
170
+ {% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
171
+ {% endif %}
172
+
173
+ {% if include.id and include.id != blank %}
174
+ {% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
175
+ {% endif %}
176
+
177
+ {% if rootAttributes %}
178
+ {% assign nodes = jekyll_toc | split: '>' %}
179
+ {% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
180
+ {% endif %}
181
+ {% endif %}
182
+ {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}
@@ -1,11 +1,11 @@
1
- {%- assign return = include.default -%}
2
-
3
- {%- assign key = include.key -%}
4
-
5
- {%- if page[key] != nil -%}
6
- {%- assign return = page[key] -%}
7
- {%- elsif layout[key] != nil -%}
8
- {%- assign return = layout[key] -%}
9
- {%- elsif site[key] != nil -%}
10
- {%- assign return = site[key] -%}
11
- {%- endif -%}
1
+ {%- assign return = include.default -%}
2
+
3
+ {%- assign key = include.key -%}
4
+
5
+ {%- if page[key] != nil -%}
6
+ {%- assign return = page[key] -%}
7
+ {%- elsif layout[key] != nil -%}
8
+ {%- assign return = layout[key] -%}
9
+ {%- elsif site[key] != nil -%}
10
+ {%- assign return = site[key] -%}
11
+ {%- endif -%}
@@ -1,23 +1,23 @@
1
- {%- assign return = nil -%}
2
- {%- assign key = include.key -%}
3
- {%- assign key_id = key | append: "_id" -%}
4
-
5
- {%- if page[key].first -%}
6
- {%- assign return = page[key] -%}
7
- {%- elsif page[key] == false -%}
8
- {%- elsif page[key_id] != nil -%}
9
- {%- assign id = page[key_id] -%}
10
- {%- assign return = site.data[id] -%}
11
- {%- elsif layout[key].first -%}
12
- {%- assign return = layout[key] -%}
13
- {%- elsif layout[key] == false -%}
14
- {%- elsif layout[key_id] != nil -%}
15
- {%- assign id = layout[key_id] -%}
16
- {%- assign return = site.data[id] -%}
17
- {%- elsif site[key].first -%}
18
- {%- assign return = site.sidebar -%}
19
- {%- elsif site[key] == false -%}
20
- {%- elsif site[key_id] != nil -%}
21
- {%- assign id = site[key_id] -%}
22
- {%- assign return = site.data[id] -%}
23
- {%- endif -%}
1
+ {%- assign return = nil -%}
2
+ {%- assign key = include.key -%}
3
+ {%- assign key_id = key | append: "_id" -%}
4
+
5
+ {%- if page[key].first -%}
6
+ {%- assign return = page[key] -%}
7
+ {%- elsif page[key] == false -%}
8
+ {%- elsif page[key_id] != nil -%}
9
+ {%- assign id = page[key_id] -%}
10
+ {%- assign return = site.data[id] -%}
11
+ {%- elsif layout[key].first -%}
12
+ {%- assign return = layout[key] -%}
13
+ {%- elsif layout[key] == false -%}
14
+ {%- elsif layout[key_id] != nil -%}
15
+ {%- assign id = layout[key_id] -%}
16
+ {%- assign return = site.data[id] -%}
17
+ {%- elsif site[key].first -%}
18
+ {%- assign return = site.sidebar -%}
19
+ {%- elsif site[key] == false -%}
20
+ {%- elsif site[key_id] != nil -%}
21
+ {%- assign id = site[key_id] -%}
22
+ {%- assign return = site.data[id] -%}
23
+ {%- endif -%}
@@ -1,5 +1,5 @@
1
- {%- if include.icon contains "<" -%}
2
- {{- include.icon | markdownify -}}
3
- {%- else -%}
4
- <i class="{{- include.icon -}}"></i>
5
- {%- endif -%}
1
+ {%- if include.icon contains "<" -%}
2
+ {{- include.icon | markdownify -}}
3
+ {%- else -%}
4
+ <i class="{{- include.icon -}}"></i>
5
+ {%- endif -%}
@@ -1,60 +1,74 @@
1
- {%- assign pageitem = include.page | default: page -%}
2
-
3
- {%- if pageitem.date -%}
4
- {%- assign year1 = site.time | date: "%Y" -%}
5
- {%- assign year2 = pageitem.date | date: "%Y" -%}
6
- {%- if year1 == year2 or include.short_date -%}
7
- {%- capture date_format -%}{%- include localize key="date_format_short" default="%b %d %H:%M" -%}{%- endcapture -%}
8
- {%- else -%}
9
- {%- capture date_format -%}{%- include localize key="date_format_long" default="%b %d, %Y %H:%M" -%}{%- endcapture -%}
10
- {%- endif -%}
11
- {%- endif -%}
12
-
13
- <div class="c-meta">
14
- {%- if pageitem.date -%}
15
- <time class="c-meta__item c-meta__item--time" datetime="{{- pageitem.date | date_to_xmlschema -}}">
16
- {{- pageitem.date | date: date_format -}}
17
- </time>
18
- {%- endif -%}
19
-
20
- {%- if include.authors and pageitem.author -%}
21
- <span class="c-meta__item c-meta__item--author">{{- pageitem.author -}}</span>
22
- {%- endif -%}
23
-
24
- {%- if include.categories and pageitem.categories and pageitem.categories.size > 0 -%}
25
- <span class="c-meta__item c-meta__item--categories">
26
- {%- for category in pageitem.categories -%}
27
- <a href="{%- include functions/get_taxonomy_link.liquid category=category -%}">{{- category -}}</a>
28
- {%- endfor -%}
29
- </span>
30
- {%- endif -%}
31
-
32
- {%- if include.tags and pageitem.tags and pageitem.tags.size > 0 -%}
33
- <span class="c-meta__item c-meta__item--tags">
34
- {%- for tag in pageitem.tags -%}
35
- <a href="{%- include functions/get_taxonomy_link.liquid tag=tag -%}">{{- tag -}}</a>
36
- {%- endfor -%}
37
- </span>
38
- {%- endif -%}
39
-
40
- {%- if include.details -%}
41
- {%- if site.source_link and site.github -%}
42
- <span class="c-meta__item c-meta__item--source">
43
- <a href="{{- site.github.repository_url -}}/blob/{{- site.github.source.branch -}}/{{- pageitem.path -}}" target="_blank">Source</a>
44
- </span>
45
- {%- endif -%}
46
-
47
- {%- if pageitem.sticky -%}
48
- <span class="c-meta__item c-meta__item--sticky">
49
- {%- include localize key="tag_sticky" default="Sticky" -%}
50
- </span>
51
- {%- endif -%}
52
-
53
- {%- if pageitem.featured -%}
54
- <span class="c-meta__item c-meta__item--featured">
55
- {%- include localize key="tag_featured" default="Featured" -%}
56
- </span>
57
- {%- endif -%}
58
- {%- endif -%}
59
-
60
- </div>
1
+ {%- assign pageitem = include.page | default: page -%}
2
+
3
+
4
+ <div class="c-meta">
5
+
6
+ {%- if pageitem.date or pageitem.last_modified_at -%}
7
+ {%- assign display_date = pageitem.last_modified_at | default: pageitem.date -%}
8
+ {%- assign year1 = site.time | date: "%Y" -%}
9
+ {%- assign year2 = display_date | date: "%Y" -%}
10
+ {%- capture full_date_format -%}{%- include localize key="date_format_long" default="%b %d, %Y %H:%M" -%}{%- endcapture -%}
11
+ {%- if year1 == year2 or include.short_date -%}
12
+ {%- capture display_date_format -%}{%- include localize key="date_format_short" default="%b %d %H:%M" -%}{%- endcapture -%}
13
+ {%- else -%}
14
+ {%- assign display_date_format = full_date_format -%}
15
+ {%- endif -%}
16
+ {%- assign publish_date = pageitem.date | date: full_date_format -%}
17
+
18
+ {%- if pageitem.last_modified_at -%}
19
+ {%- assign modified_date = pageitem.last_modified_at | date: full_date_format -%}
20
+ {%- capture date_published_tooltip -%}{%- include localize key="date_published_tooltip" default="Published: :param1" param1=publish_date -%}{%- endcapture -%}
21
+ {%- capture date_modified_tooltip -%}{%- include localize key="date_modified_tooltip" default="Modified: :param1" param1=modified_date -%}{%- endcapture -%}
22
+ {%- capture date_modified_info -%}{%- include localize key="date_modified_info" default="(Modified)" -%}{%- endcapture -%}
23
+ <time class="c-meta__item c-meta__item--time" datetime="{{- pageitem.last_modified_at | date_to_xmlschema -}}" title="{{- date_published_tooltip -}}&#10;{{- date_modified_tooltip -}}">
24
+ {{- pageitem.last_modified_at | date: display_date_format }}<small>{{- date_modified_info -}}</small>
25
+ </time>
26
+ {%- else -%}
27
+ {%- capture date_published_tooltip -%}{%- include localize key="date_published_tooltip" default="Published: :param1" param1=publish_date -%}{%- endcapture -%}
28
+ <time class="c-meta__item c-meta__item--time" datetime="{{- pageitem.date | date_to_xmlschema -}}" title="{{- date_published_tooltip -}}">
29
+ {{- pageitem.date | date: display_date_format -}}
30
+ </time>
31
+ {%- endif -%}
32
+ {%- endif -%}
33
+
34
+ {%- if include.authors and pageitem.author -%}
35
+ <span class="c-meta__item c-meta__item--authors">{{- pageitem.author -}}</span>
36
+ {%- endif -%}
37
+
38
+ {%- if include.categories and pageitem.categories and pageitem.categories.size > 0 -%}
39
+ <span class="c-meta__item c-meta__item--categories">
40
+ {%- for category in pageitem.categories -%}
41
+ <a href="{%- include functions/get_taxonomy_link.liquid category=category -%}">{{- category -}}</a>
42
+ {%- endfor -%}
43
+ </span>
44
+ {%- endif -%}
45
+
46
+ {%- if include.tags and pageitem.tags and pageitem.tags.size > 0 -%}
47
+ <span class="c-meta__item c-meta__item--tags">
48
+ {%- for tag in pageitem.tags -%}
49
+ <a href="{%- include functions/get_taxonomy_link.liquid tag=tag -%}">{{- tag -}}</a>
50
+ {%- endfor -%}
51
+ </span>
52
+ {%- endif -%}
53
+
54
+ {%- if include.details -%}
55
+ {%- if site.source_link and site.github -%}
56
+ <span class="c-meta__item c-meta__item--source">
57
+ <a href="{{- site.github.repository_url -}}/blob/{{- site.github.source.branch -}}/{{- pageitem.path -}}" target="_blank">Source</a>
58
+ </span>
59
+ {%- endif -%}
60
+
61
+ {%- if pageitem.sticky -%}
62
+ <span class="c-meta__item c-meta__item--sticky">
63
+ {%- include localize key="tag_sticky" default="Sticky" -%}
64
+ </span>
65
+ {%- endif -%}
66
+
67
+ {%- if pageitem.featured -%}
68
+ <span class="c-meta__item c-meta__item--featured">
69
+ {%- include localize key="tag_featured" default="Featured" -%}
70
+ </span>
71
+ {%- endif -%}
72
+ {%- endif -%}
73
+
74
+ </div>
@@ -1,23 +1,22 @@
1
- {%- assign pageitem = include.page | default: page -%}
2
- {%- assign thumbnail_src = pageitem.thumbnail -%}
3
-
4
- {%- if thumbnail_src == nil and include.autodetect -%}
5
- {%- assign html = include.html -%}
6
- {%- unless html -%}
7
- {%- assign html = pageitem.content | markdownify -%}
8
- {%- endunless -%}
9
-
10
- {%- assign slices = html | split:"<img " -%}
11
- {%- if slices.size > 1 -%}
12
- {%- assign attrs = slices[1] | split: ">" | first | replace: "'", '"' -%}
13
- {%- assign slices = attrs | split: 'src="' -%}
14
- {%- assign thumbnail_src = slices[1] | split: '"' | first -%}
15
- {%- endif -%}
16
-
17
- {%- if thumbnail_src.size == 0 and site.thumbnail_placeholder -%}
18
- {%- assign thumbnail_src = site.thumbnail_placeholder -%}
19
- {%- endif -%}
20
-
21
- {%- endif -%}
22
-
23
- {{- thumbnail_src -}}
1
+ {%- assign pageitem = include.page | default: page -%}
2
+ {%- assign thumbnail_src = pageitem.thumbnail | default: pageitem.image.path | default: pageitem.image -%}
3
+
4
+ {%- if thumbnail_src == nil and include.autodetect -%}
5
+ {%- assign html = include.html -%}
6
+ {%- unless html -%}
7
+ {%- assign html = pageitem.content -%}
8
+ {%- endunless -%}
9
+
10
+ {%- assign slices = html | split:"<img " -%}
11
+ {%- if slices.size > 1 -%}
12
+ {%- assign attrs = slices[1] | split: ">" | first | replace: "'", '"' -%}
13
+ {%- assign slices = attrs | split: 'src="' -%}
14
+ {%- assign thumbnail_src = slices[1] | split: '"' | first -%}
15
+ {%- endif -%}
16
+ {%- endif -%}
17
+
18
+ {%- if thumbnail_src.size == 0 and site.thumbnail_placeholder -%}
19
+ {%- assign thumbnail_src = site.thumbnail_placeholder -%}
20
+ {%- endif -%}
21
+
22
+ {{- thumbnail_src -}}