just-the-docs 0.3.1 → 0.4.0.rc1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +484 -0
- data/README.md +22 -5
- data/_includes/css/callouts.scss.liquid +93 -0
- data/_includes/css/just-the-docs.scss.liquid +2 -1
- data/_includes/favicon.html +1 -0
- data/_includes/fix_linenos.html +65 -0
- data/_includes/footer_custom.html +3 -0
- data/_includes/head.html +9 -4
- data/_includes/header_custom.html +0 -0
- data/_includes/icons/external_link.html +5 -0
- data/_includes/mermaid_config.js +1 -0
- data/_includes/nav.html +133 -46
- data/_includes/nav_footer_custom.html +0 -0
- data/_includes/search_placeholder_custom.html +1 -0
- data/_includes/vendor/anchor_headings.html +52 -8
- data/_layouts/default.html +71 -15
- data/_sass/base.scss +5 -4
- data/_sass/buttons.scss +0 -2
- data/_sass/code.scss +101 -213
- data/_sass/color_schemes/dark.scss +15 -4
- data/_sass/color_schemes/light.scss +208 -0
- data/_sass/content.scss +63 -21
- data/_sass/custom/custom.scss +4 -0
- data/_sass/labels.scss +1 -2
- data/_sass/layout.scss +3 -2
- data/_sass/modules.scss +1 -5
- data/_sass/navigation.scss +51 -2
- data/_sass/print.scss +1 -1
- data/_sass/search.scss +3 -4
- data/_sass/support/_functions.scss +4 -4
- data/_sass/support/_variables.scss +19 -25
- data/_sass/support/mixins/_layout.scss +1 -1
- data/_sass/support/mixins/_typography.scss +20 -22
- data/_sass/tables.scss +1 -2
- data/_sass/typography.scss +10 -6
- data/_sass/utilities/_colors.scss +0 -2
- data/_sass/utilities/_layout.scss +9 -3
- data/_sass/utilities/_lists.scss +1 -3
- data/_sass/utilities/_spacing.scss +1 -4
- data/_sass/utilities/_typography.scss +0 -6
- data/_sass/vendor/OneDarkJekyll/LICENSE +21 -0
- data/_sass/vendor/OneDarkJekyll/README.md +25 -0
- data/_sass/vendor/OneDarkJekyll/colors.less +30 -0
- data/_sass/vendor/OneDarkJekyll/syntax-firewatch-green.scss +200 -0
- data/_sass/vendor/OneDarkJekyll/syntax-firewatch.scss +200 -0
- data/_sass/vendor/OneDarkJekyll/syntax-one-dark-vivid.scss +200 -0
- data/_sass/vendor/OneDarkJekyll/syntax-one-dark.scss +200 -0
- data/_sass/vendor/OneDarkJekyll/syntax-variables.less +56 -0
- data/_sass/vendor/OneDarkJekyll/syntax.less +93 -0
- data/_sass/vendor/normalize.scss/README.md +4 -75
- data/_sass/vendor/normalize.scss/normalize.scss +159 -235
- data/assets/images/large-image.jpg +0 -0
- data/assets/images/small-image.jpg +0 -0
- data/assets/js/just-the-docs.js +15 -2
- data/assets/js/zzzz-search-data.json +20 -6
- data/favicon.ico +0 -0
- data/lib/tasks/search.rake +20 -6
- metadata +39 -18
- data/_sass/vendor/normalize.scss/package.json +0 -70
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
This file can be used to fix the HTML produced by Jekyll for highlighted
|
|
3
|
+
code with line numbers.
|
|
4
|
+
|
|
5
|
+
It works with `{% highlight some_language linenos %}...{% endhighlight %}`
|
|
6
|
+
and with the Kramdown option to add line numbers to fenced code.
|
|
7
|
+
|
|
8
|
+
The implementation was derived from the workaround provided by
|
|
9
|
+
Dmitry Hrabrov (DeXP) at
|
|
10
|
+
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
|
|
11
|
+
|
|
12
|
+
EXPLANATION
|
|
13
|
+
|
|
14
|
+
The HTML produced by Rouge highlighting with lie numbers is of the form
|
|
15
|
+
`code table`. Jekyll (<= 4.1.1) always wraps the highlighted HTML
|
|
16
|
+
with `pre`. This wrapping is not only unnecessary, but also transforms
|
|
17
|
+
the conforming HTML produced by Rouge to non-conforming HTML, which
|
|
18
|
+
results in HTML validation error reports.
|
|
19
|
+
|
|
20
|
+
The fix removes the outer `pre` tags whenever they contain the pattern
|
|
21
|
+
`<table class="rouge-table">`.
|
|
22
|
+
|
|
23
|
+
Apart from avoiding HTML validation errors, the fix allows the use of
|
|
24
|
+
the [Jekyll layout for compressing HTML](http://jch.penibelst.de),
|
|
25
|
+
which relies on `pre` tags not being nested, according to
|
|
26
|
+
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-172069842
|
|
27
|
+
|
|
28
|
+
USAGE
|
|
29
|
+
|
|
30
|
+
(Any names can be used for `some_var` and `some_language`.)
|
|
31
|
+
|
|
32
|
+
{% capture some_var %}
|
|
33
|
+
{% highlight some_language linenos %}
|
|
34
|
+
Some code
|
|
35
|
+
{% endhighlight %}
|
|
36
|
+
{% endcapture %}
|
|
37
|
+
{% include fix_linenos.html code=some_var %}
|
|
38
|
+
|
|
39
|
+
For code fences:
|
|
40
|
+
|
|
41
|
+
{% capture some_var %}
|
|
42
|
+
```some_language
|
|
43
|
+
Some code
|
|
44
|
+
```
|
|
45
|
+
{% endcapture %}
|
|
46
|
+
{% assign some_var = some_var | markdownify %}
|
|
47
|
+
{% include fix_linenos.html code=some_var %}
|
|
48
|
+
|
|
49
|
+
CAVEATS
|
|
50
|
+
|
|
51
|
+
The above does not work when `Some code` happens to contain the matched string
|
|
52
|
+
`<table class="rouge-table">`.
|
|
53
|
+
|
|
54
|
+
The use of this file overwrites the variable `fix_linenos_code` with `nil`.
|
|
55
|
+
|
|
56
|
+
{%- endcomment -%}
|
|
57
|
+
|
|
58
|
+
{% assign fix_linenos_code = include.code %}
|
|
59
|
+
{% if fix_linenos_code contains '<table class="rouge-table">' %}
|
|
60
|
+
{% assign fix_linenos_code = fix_linenos_code | replace: '<pre class="highlight">', '<pre>' %}
|
|
61
|
+
{% assign fix_linenos_code = fix_linenos_code | replace: "<pre><code", "<code" %}
|
|
62
|
+
{% assign fix_linenos_code = fix_linenos_code | replace: "</code></pre>", "</code>" %}
|
|
63
|
+
{% endif %}
|
|
64
|
+
{{ fix_linenos_code }}
|
|
65
|
+
{% assign fix_linenos_code = nil %}
|
data/_includes/head.html
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
{% endif %}
|
|
11
11
|
{% endunless %}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
{% include favicon.html %}
|
|
14
14
|
|
|
15
|
-
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' |
|
|
15
|
+
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
|
|
16
16
|
|
|
17
17
|
{% if site.ga_tracking != nil %}
|
|
18
18
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
|
|
@@ -27,9 +27,14 @@
|
|
|
27
27
|
{% endif %}
|
|
28
28
|
|
|
29
29
|
{% if site.search_enabled != false %}
|
|
30
|
-
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' |
|
|
30
|
+
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
|
|
31
31
|
{% endif %}
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
{% if site.mermaid %}
|
|
34
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@{{ site.mermaid.version }}/dist/mermaid.min.js"></script>
|
|
35
|
+
{% endif %}
|
|
36
|
+
|
|
37
|
+
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
|
|
33
38
|
|
|
34
39
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
35
40
|
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
|
2
|
+
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
|
3
|
+
<title id="svg-external-link-title">(external link)</title>
|
|
4
|
+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
|
5
|
+
</symbol>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
data/_includes/nav.html
CHANGED
|
@@ -1,55 +1,142 @@
|
|
|
1
1
|
<ul class="nav-list">
|
|
2
|
-
{%- assign
|
|
3
|
-
|
|
2
|
+
{%- assign titled_pages = include.pages
|
|
3
|
+
| where_exp:"item", "item.title != nil" -%}
|
|
4
|
+
|
|
5
|
+
{%- comment -%}
|
|
6
|
+
The values of `title` and `nav_order` can be numbers or strings.
|
|
7
|
+
Jekyll gives build failures when sorting on mixtures of different types,
|
|
8
|
+
so numbers and strings need to be sorted separately.
|
|
9
|
+
|
|
10
|
+
Here, numbers are sorted by their values, and come before all strings.
|
|
11
|
+
An omitted `nav_order` value is equivalent to the page's `title` value
|
|
12
|
+
(except that a numerical `title` value is treated as a string).
|
|
13
|
+
|
|
14
|
+
The case-sensitivity of string sorting is determined by `site.nav_sort`.
|
|
15
|
+
{%- endcomment -%}
|
|
16
|
+
|
|
17
|
+
{%- assign string_ordered_pages = titled_pages
|
|
18
|
+
| where_exp:"item", "item.nav_order == nil" -%}
|
|
19
|
+
{%- assign nav_ordered_pages = titled_pages
|
|
20
|
+
| where_exp:"item", "item.nav_order != nil" -%}
|
|
21
|
+
|
|
22
|
+
{%- comment -%}
|
|
23
|
+
The nav_ordered_pages have to be added to number_ordered_pages and
|
|
24
|
+
string_ordered_pages, depending on the nav_order value.
|
|
25
|
+
The first character of the jsonify result is `"` only for strings.
|
|
26
|
+
{%- endcomment -%}
|
|
27
|
+
{%- assign nav_ordered_groups = nav_ordered_pages
|
|
28
|
+
| group_by_exp:"item", "item.nav_order | jsonify | slice: 0" -%}
|
|
29
|
+
{%- assign number_ordered_pages = "" | split:"X" -%}
|
|
30
|
+
{%- for group in nav_ordered_groups -%}
|
|
31
|
+
{%- if group.name == '"' -%}
|
|
32
|
+
{%- assign string_ordered_pages = string_ordered_pages | concat: group.items -%}
|
|
33
|
+
{%- else -%}
|
|
34
|
+
{%- assign number_ordered_pages = number_ordered_pages | concat: group.items -%}
|
|
35
|
+
{%- endif -%}
|
|
36
|
+
{%- endfor -%}
|
|
37
|
+
|
|
38
|
+
{%- assign sorted_number_ordered_pages = number_ordered_pages | sort:"nav_order" -%}
|
|
39
|
+
|
|
40
|
+
{%- comment -%}
|
|
41
|
+
The string_ordered_pages have to be sorted by nav_order, and otherwise title
|
|
42
|
+
(where appending the empty string to a numeric title converts it to a string).
|
|
43
|
+
After grouping them by those values, the groups are sorted, then the items
|
|
44
|
+
of each group are concatenated.
|
|
45
|
+
{%- endcomment -%}
|
|
46
|
+
{%- assign string_ordered_groups = string_ordered_pages
|
|
47
|
+
| group_by_exp:"item", "item.nav_order | default: item.title | append:''" -%}
|
|
4
48
|
{%- if site.nav_sort == 'case_insensitive' -%}
|
|
5
|
-
{%- assign
|
|
6
|
-
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%}
|
|
49
|
+
{%- assign sorted_string_ordered_groups = string_ordered_groups | sort_natural:"name" -%}
|
|
7
50
|
{%- else -%}
|
|
8
|
-
{%- assign
|
|
9
|
-
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
|
|
51
|
+
{%- assign sorted_string_ordered_groups = string_ordered_groups | sort:"name" -%}
|
|
10
52
|
{%- endif -%}
|
|
11
|
-
{%- assign
|
|
53
|
+
{%- assign sorted_string_ordered_pages = "" | split:"X" -%}
|
|
54
|
+
{%- for group in sorted_string_ordered_groups -%}
|
|
55
|
+
{%- assign sorted_string_ordered_pages = sorted_string_ordered_pages | concat: group.items -%}
|
|
56
|
+
{%- endfor -%}
|
|
57
|
+
|
|
58
|
+
{%- assign pages_list = sorted_number_ordered_pages | concat: sorted_string_ordered_pages -%}
|
|
59
|
+
|
|
12
60
|
{%- for node in pages_list -%}
|
|
13
|
-
{%-
|
|
14
|
-
{%-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
61
|
+
{%- if node.parent == nil -%}
|
|
62
|
+
{%- unless node.nav_exclude -%}
|
|
63
|
+
<li class="nav-list-item{% if page.collection == include.key and page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
|
|
64
|
+
{%- if node.has_children -%}
|
|
65
|
+
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
|
|
66
|
+
{%- endif -%}
|
|
67
|
+
<a href="{{ node.url | relative_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
|
|
68
|
+
{%- if node.has_children -%}
|
|
69
|
+
{%- if node.child_nav_order == 'desc' -%}
|
|
70
|
+
{%- assign children_list = pages_list | where: "parent", node.title | where_exp:"item", "item.grand_parent == nil" | reverse -%}
|
|
71
|
+
{%- else -%}
|
|
72
|
+
{%- assign children_list = pages_list | where: "parent", node.title | where_exp:"item", "item.grand_parent == nil" -%}
|
|
21
73
|
{%- endif -%}
|
|
22
|
-
<
|
|
23
|
-
{%-
|
|
24
|
-
{%-
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
74
|
+
<ul class="nav-list ">
|
|
75
|
+
{%- for child in children_list -%}
|
|
76
|
+
{%- unless child.nav_exclude -%}
|
|
77
|
+
<li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
|
|
78
|
+
{%- if child.has_children -%}
|
|
79
|
+
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
|
|
80
|
+
{%- endif -%}
|
|
81
|
+
<a href="{{ child.url | relative_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
|
82
|
+
{%- if child.has_children -%}
|
|
83
|
+
{%- if node.child_nav_order == 'desc' -%}
|
|
84
|
+
{%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title | reverse -%}
|
|
85
|
+
{%- else -%}
|
|
86
|
+
{%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
|
|
87
|
+
{%- endif -%}
|
|
88
|
+
<ul class="nav-list">
|
|
89
|
+
{%- for grand_child in grand_children_list -%}
|
|
90
|
+
{%- unless grand_child.nav_exclude -%}
|
|
91
|
+
<li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}">
|
|
92
|
+
<a href="{{ grand_child.url | relative_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
|
|
93
|
+
</li>
|
|
94
|
+
{%- endunless -%}
|
|
95
|
+
{%- endfor -%}
|
|
96
|
+
</ul>
|
|
97
|
+
{%- endif -%}
|
|
98
|
+
</li>
|
|
99
|
+
{%- endunless -%}
|
|
100
|
+
{%- endfor -%}
|
|
101
|
+
</ul>
|
|
102
|
+
{%- endif -%}
|
|
103
|
+
</li>
|
|
104
|
+
{%- endunless -%}
|
|
105
|
+
{%- endif -%}
|
|
106
|
+
{%- endfor -%}
|
|
107
|
+
{%- assign nav_external_links = site.nav_external_links -%}
|
|
108
|
+
{%- for node in nav_external_links -%}
|
|
109
|
+
<li class="nav-list-item external">
|
|
110
|
+
<a href="{{ node.url | absolute_url }}" class="nav-list-link external">
|
|
111
|
+
{{ node.title }}
|
|
112
|
+
{% unless node.hide_icon %}<svg viewBox="0 0 24 24" aria-labelledby="svg-external-link-title"><use xlink:href="#svg-external-link"></use></svg>{% endunless %}
|
|
113
|
+
</a>
|
|
114
|
+
</li>
|
|
115
|
+
{%- endfor -%}
|
|
116
|
+
</ul>
|
|
117
|
+
|
|
118
|
+
{%- if page.collection == include.key -%}
|
|
119
|
+
|
|
120
|
+
{%- for node in pages_list -%}
|
|
121
|
+
{%- if node.parent == nil -%}
|
|
122
|
+
{%- if page.grand_parent == node.title or page.parent == node.title and page.grand_parent == nil -%}
|
|
123
|
+
{%- assign first_level_url = node.url | relative_url -%}
|
|
124
|
+
{%- endif -%}
|
|
125
|
+
{%- if node.has_children -%}
|
|
126
|
+
{%- assign children_list = pages_list | where: "parent", node.title -%}
|
|
127
|
+
{%- for child in children_list -%}
|
|
128
|
+
{%- if child.has_children -%}
|
|
129
|
+
{%- if page.url == child.url or page.parent == child.title and page.grand_parent == child.parent -%}
|
|
130
|
+
{%- assign second_level_url = child.url | relative_url -%}
|
|
131
|
+
{%- endif -%}
|
|
50
132
|
{%- endif -%}
|
|
51
|
-
|
|
133
|
+
{%- endfor -%}
|
|
52
134
|
{%- endif -%}
|
|
53
|
-
{%-
|
|
135
|
+
{%- endif -%}
|
|
54
136
|
{%- endfor -%}
|
|
55
|
-
|
|
137
|
+
|
|
138
|
+
{% if page.has_children == true and page.has_toc != false %}
|
|
139
|
+
{%- assign toc_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
|
|
140
|
+
{%- endif -%}
|
|
141
|
+
|
|
142
|
+
{%- endif -%}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Search {{site.title}}
|
|
@@ -1,18 +1,44 @@
|
|
|
1
1
|
{% capture headingsWorkspace %}
|
|
2
2
|
{% comment %}
|
|
3
|
-
|
|
3
|
+
Copyright (c) 2018 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.0.7
|
|
4
28
|
https://github.com/allejo/jekyll-anchor-headings
|
|
5
29
|
|
|
6
30
|
"Be the pull request you wish to see in the world." ~Ben Balter
|
|
7
31
|
|
|
8
32
|
Usage:
|
|
9
|
-
{% include anchor_headings.html html=content %}
|
|
33
|
+
{% include anchor_headings.html html=content anchorBody="#" %}
|
|
10
34
|
|
|
11
35
|
Parameters:
|
|
12
36
|
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
|
13
37
|
|
|
14
38
|
Optional Parameters:
|
|
15
39
|
* beforeHeading (bool) : false - Set to true if the anchor should be placed _before_ the heading's content
|
|
40
|
+
* anchorAttrs (string) : '' - Any custom HTML attributes that will be added to the `<a>` tag; you may NOT use `href`, `class` or `title`;
|
|
41
|
+
the `%heading%` and `%html_id%` placeholders are available
|
|
16
42
|
* anchorBody (string) : '' - The content that will be placed inside the anchor; the `%heading%` placeholder is available
|
|
17
43
|
* anchorClass (string) : '' - The class(es) that will be used for each anchor. Separate multiple classes with a space
|
|
18
44
|
* anchorTitle (string) : '' - The `title` attribute that will be used for anchors
|
|
@@ -42,17 +68,22 @@
|
|
|
42
68
|
{% assign nextChar = node | replace: '"', '' | strip | slice: 0, 1 %}
|
|
43
69
|
{% assign headerLevel = nextChar | times: 1 %}
|
|
44
70
|
|
|
45
|
-
<!-- If the level is cast to 0, it means it's not a h1-h6 tag, so let's
|
|
71
|
+
<!-- If the level is cast to 0, it means it's not a h1-h6 tag, so let's see if we need to fix it -->
|
|
46
72
|
{% if headerLevel == 0 %}
|
|
47
|
-
|
|
73
|
+
<!-- Split up the node based on closing angle brackets and get the first one. -->
|
|
74
|
+
{% assign firstChunk = node | split: '>' | first %}
|
|
75
|
+
|
|
76
|
+
<!-- If the first chunk does NOT contain a '<', that means we've broken another HTML tag that starts with 'h' -->
|
|
77
|
+
{% unless firstChunk contains '<' %}
|
|
48
78
|
{% capture node %}<h{{ node }}{% endcapture %}
|
|
49
|
-
{%
|
|
79
|
+
{% endunless %}
|
|
50
80
|
|
|
51
81
|
{% capture edited_headings %}{{ edited_headings }}{{ node }}{% endcapture %}
|
|
52
82
|
{% continue %}
|
|
53
83
|
{% endif %}
|
|
54
84
|
|
|
55
|
-
{%
|
|
85
|
+
{% capture _closingTag %}</h{{ headerLevel }}>{% endcapture %}
|
|
86
|
+
{% assign _workspace = node | split: _closingTag %}
|
|
56
87
|
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
|
57
88
|
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
|
58
89
|
{% assign html_id = _idWorkspace[0] %}
|
|
@@ -64,7 +95,7 @@
|
|
|
64
95
|
{% capture anchor %}{% endcapture %}
|
|
65
96
|
|
|
66
97
|
{% if html_id and headerLevel >= minHeader and headerLevel <= maxHeader %}
|
|
67
|
-
{% capture anchor %}href="#{{ html_id
|
|
98
|
+
{% capture anchor %}href="#{{ html_id }}"{% endcapture %}
|
|
68
99
|
|
|
69
100
|
{% if include.anchorClass %}
|
|
70
101
|
{% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %}
|
|
@@ -74,6 +105,10 @@
|
|
|
74
105
|
{% capture anchor %}{{ anchor }} title="{{ include.anchorTitle | replace: '%heading%', header }}"{% endcapture %}
|
|
75
106
|
{% endif %}
|
|
76
107
|
|
|
108
|
+
{% if include.anchorAttrs %}
|
|
109
|
+
{% capture anchor %}{{ anchor }} {{ include.anchorAttrs | replace: '%heading%', header | replace: '%html_id%', html_id }}{% endcapture %}
|
|
110
|
+
{% endif %}
|
|
111
|
+
|
|
77
112
|
{% capture anchor %}<a {{ anchor }}>{{ include.anchorBody | replace: '%heading%', header | default: '' }}</a>{% endcapture %}
|
|
78
113
|
|
|
79
114
|
<!-- In order to prevent adding extra space after a heading, we'll let the 'anchor' value contain it -->
|
|
@@ -93,8 +128,17 @@
|
|
|
93
128
|
{{ header }}{{ anchor }}
|
|
94
129
|
{% endif %}
|
|
95
130
|
{{ include.bodySuffix }}
|
|
96
|
-
</h{{
|
|
131
|
+
</h{{ headerLevel }}>
|
|
97
132
|
{% endcapture %}
|
|
133
|
+
|
|
134
|
+
<!--
|
|
135
|
+
If we have content after the `</hX>` tag, then we'll want to append that here so we don't lost any content.
|
|
136
|
+
-->
|
|
137
|
+
{% assign chunkCount = _workspace | size %}
|
|
138
|
+
{% if chunkCount > 1 %}
|
|
139
|
+
{% capture new_heading %}{{ new_heading }}{{ _workspace | last }}{% endcapture %}
|
|
140
|
+
{% endif %}
|
|
141
|
+
|
|
98
142
|
{% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %}
|
|
99
143
|
{% endfor %}
|
|
100
144
|
{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }}
|
data/_layouts/default.html
CHANGED
|
@@ -38,33 +38,81 @@ layout: table_wrappers
|
|
|
38
38
|
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
|
39
39
|
</svg>
|
|
40
40
|
</symbol>
|
|
41
|
+
{% include icons/external_link.html %}
|
|
41
42
|
</svg>
|
|
42
43
|
|
|
43
44
|
<div class="side-bar">
|
|
44
45
|
<div class="site-header">
|
|
45
|
-
<a href="{{ '/' |
|
|
46
|
+
<a href="{{ '/' | relative_url }}" class="site-title lh-tight">{% include title.html %}</a>
|
|
46
47
|
<a href="#" id="menu-button" class="site-button">
|
|
47
48
|
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
|
48
49
|
</a>
|
|
49
50
|
</div>
|
|
50
51
|
<nav role="navigation" aria-label="Main" id="site-nav" class="site-nav">
|
|
51
|
-
{%
|
|
52
|
+
{% assign pages_top_size = site.html_pages
|
|
53
|
+
| where_exp:"item", "item.title != nil"
|
|
54
|
+
| where_exp:"item", "item.parent == nil"
|
|
55
|
+
| where_exp:"item", "item.nav_exclude != true"
|
|
56
|
+
| size %}
|
|
57
|
+
{% if pages_top_size > 0 %}
|
|
58
|
+
{% include nav.html pages=site.html_pages key=nil %}
|
|
59
|
+
{% endif %}
|
|
60
|
+
{% if site.just_the_docs.collections %}
|
|
61
|
+
{% assign collections_size = site.just_the_docs.collections | size %}
|
|
62
|
+
{% for collection_entry in site.just_the_docs.collections %}
|
|
63
|
+
{% assign collection_key = collection_entry[0] %}
|
|
64
|
+
{% assign collection_value = collection_entry[1] %}
|
|
65
|
+
{% assign collection = site[collection_key] %}
|
|
66
|
+
{% if collection_value.nav_exclude != true %}
|
|
67
|
+
{% if collections_size > 1 or pages_top_size > 0 %}
|
|
68
|
+
{% if collection_value.nav_fold == true %}
|
|
69
|
+
<ul class="nav-list nav-category-list">
|
|
70
|
+
<li class="nav-list-item{% if page.collection == collection_key %} active{% endif %}">
|
|
71
|
+
{%- if collection.size > 0 -%}
|
|
72
|
+
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
|
|
73
|
+
{%- endif -%}
|
|
74
|
+
<div class="nav-category">{{ collection_value.name }}</div>
|
|
75
|
+
{% include nav.html pages=collection key=collection_key %}
|
|
76
|
+
</li>
|
|
77
|
+
</ul>
|
|
78
|
+
{% else %}
|
|
79
|
+
<div class="nav-category">{{ collection_value.name }}</div>
|
|
80
|
+
{% include nav.html pages=collection key=collection_key %}
|
|
81
|
+
{% endif %}
|
|
82
|
+
{% else %}
|
|
83
|
+
{% include nav.html pages=collection key=collection_key %}
|
|
84
|
+
{% endif %}
|
|
85
|
+
{% endif %}
|
|
86
|
+
{% endfor %}
|
|
87
|
+
{% endif %}
|
|
52
88
|
</nav>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
89
|
+
|
|
90
|
+
{% capture nav_footer_custom %}
|
|
91
|
+
{%- include nav_footer_custom.html -%}
|
|
92
|
+
{% endcapture %}
|
|
93
|
+
{% if nav_footer_custom != "" %}
|
|
94
|
+
{{ nav_footer_custom }}
|
|
95
|
+
{% else %}
|
|
96
|
+
<footer class="site-footer">
|
|
97
|
+
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
|
98
|
+
</footer>
|
|
99
|
+
{% endif %}
|
|
56
100
|
</div>
|
|
57
101
|
<div class="main" id="top">
|
|
58
102
|
<div id="main-header" class="main-header">
|
|
59
103
|
{% if site.search_enabled != false %}
|
|
104
|
+
|
|
105
|
+
{% capture search_placeholder %}{% include search_placeholder_custom.html %}{% endcapture %}
|
|
106
|
+
|
|
60
107
|
<div class="search">
|
|
61
108
|
<div class="search-input-wrap">
|
|
62
|
-
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="
|
|
109
|
+
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="{{ search_placeholder | strip_html | strip }}" aria-label="{{ search_placeholder | strip_html| strip }}" autocomplete="off">
|
|
63
110
|
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
|
64
111
|
</div>
|
|
65
112
|
<div id="search-results" class="search-results"></div>
|
|
66
113
|
</div>
|
|
67
114
|
{% endif %}
|
|
115
|
+
{% include header_custom.html %}
|
|
68
116
|
{% if site.aux_links %}
|
|
69
117
|
<nav aria-label="Auxiliary" class="aux-nav">
|
|
70
118
|
<ul class="aux-nav-list">
|
|
@@ -101,7 +149,7 @@ layout: table_wrappers
|
|
|
101
149
|
{% endunless %}
|
|
102
150
|
<div id="main-content" class="main-content" role="main">
|
|
103
151
|
{% if site.heading_anchors != false %}
|
|
104
|
-
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" %}
|
|
152
|
+
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
|
|
105
153
|
{% else %}
|
|
106
154
|
{{ content }}
|
|
107
155
|
{% endif %}
|
|
@@ -110,24 +158,25 @@ layout: table_wrappers
|
|
|
110
158
|
<hr>
|
|
111
159
|
<h2 class="text-delta">Table of contents</h2>
|
|
112
160
|
<ul>
|
|
113
|
-
{
|
|
114
|
-
{% for child in children_list %}
|
|
161
|
+
{% for child in toc_list %}
|
|
115
162
|
<li>
|
|
116
|
-
<a href="{{ child.url |
|
|
163
|
+
<a href="{{ child.url | relative_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
|
|
117
164
|
</li>
|
|
118
165
|
{% endfor %}
|
|
119
166
|
</ul>
|
|
120
167
|
{% endif %}
|
|
121
168
|
|
|
122
|
-
{%
|
|
169
|
+
{% capture footer_custom %}
|
|
170
|
+
{%- include footer_custom.html -%}
|
|
171
|
+
{% endcapture %}
|
|
172
|
+
{% if footer_custom != "" or site.last_edit_timestamp or site.gh_edit_link %}
|
|
123
173
|
<hr>
|
|
124
174
|
<footer>
|
|
125
175
|
{% if site.back_to_top %}
|
|
126
176
|
<p><a href="#top" id="back-to-top">{{ site.back_to_top_text }}</a></p>
|
|
127
177
|
{% endif %}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
{% endif %}
|
|
178
|
+
|
|
179
|
+
{{ footer_custom }}
|
|
131
180
|
|
|
132
181
|
{% if site.last_edit_timestamp or site.gh_edit_link %}
|
|
133
182
|
<div class="d-flex mt-2">
|
|
@@ -144,7 +193,7 @@ layout: table_wrappers
|
|
|
144
193
|
site.gh_edit_view_mode
|
|
145
194
|
%}
|
|
146
195
|
<p class="text-small text-grey-dk-000 mb-0">
|
|
147
|
-
<a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
|
|
196
|
+
<a href="{{ site.gh_edit_repository }}/{{ site.gh_edit_view_mode }}/{{ site.gh_edit_branch }}{% if site.gh_edit_source %}/{{ site.gh_edit_source }}{% endif %}{% if page.collection and site.collections_dir %}/{{ site.collections_dir }}{% endif %}/{{ page.path }}" id="edit-this-page">{{ site.gh_edit_link_text }}</a>
|
|
148
197
|
</p>
|
|
149
198
|
{% endif %}
|
|
150
199
|
</div>
|
|
@@ -166,4 +215,11 @@ layout: table_wrappers
|
|
|
166
215
|
{% endif %}
|
|
167
216
|
</div>
|
|
168
217
|
</body>
|
|
218
|
+
{% if site.mermaid %}
|
|
219
|
+
<script>
|
|
220
|
+
var config = {% include mermaid_config.js %};
|
|
221
|
+
mermaid.initialize(config);
|
|
222
|
+
window.mermaid.init(undefined, document.querySelectorAll('.language-mermaid'));
|
|
223
|
+
</script>
|
|
224
|
+
{% endif %}
|
|
169
225
|
</html>
|
data/_sass/base.scss
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
//
|
|
2
1
|
// Base element style overrides
|
|
3
|
-
//
|
|
4
|
-
// stylelint-disable selector-no-type, selector-max-type
|
|
2
|
+
// stylelint-disable selector-no-type, selector-max-type, selector-max-specificity, selector-max-id
|
|
5
3
|
|
|
6
4
|
* {
|
|
7
5
|
box-sizing: border-box;
|
|
@@ -14,6 +12,7 @@
|
|
|
14
12
|
|
|
15
13
|
html {
|
|
16
14
|
@include fs-4;
|
|
15
|
+
|
|
17
16
|
scroll-behavior: smooth;
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -23,6 +22,7 @@ body {
|
|
|
23
22
|
line-height: $body-line-height;
|
|
24
23
|
color: $body-text-color;
|
|
25
24
|
background-color: $body-background-color;
|
|
25
|
+
overflow-wrap: break-word;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
ol,
|
|
@@ -45,7 +45,8 @@ h2,
|
|
|
45
45
|
h3,
|
|
46
46
|
h4,
|
|
47
47
|
h5,
|
|
48
|
-
h6
|
|
48
|
+
h6,
|
|
49
|
+
#toctitle {
|
|
49
50
|
margin-top: 0;
|
|
50
51
|
margin-bottom: 1em;
|
|
51
52
|
font-weight: 500;
|