jekyll-rtd-theme 1.1.8 → 2.0.0.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +23 -65
- data/_includes/addons/analytics.liquid +4 -4
- data/_includes/addons/github.liquid +7 -10
- data/_includes/breadcrumbs.liquid +27 -0
- data/_includes/extend/list.liquid +2 -2
- data/_includes/{reset → extend}/tabs.liquid +0 -0
- data/_includes/extend/toctree.liquid +6 -5
- data/_includes/footer.liquid +36 -0
- data/_includes/reset/defaults.liquid +25 -60
- data/_includes/reset/workdir.liquid +1 -0
- data/_includes/safe/shortcodes.liquid +9 -0
- data/_includes/shortcodes/danger.liquid +3 -2
- data/_includes/shortcodes/note.liquid +3 -2
- data/_includes/shortcodes/tip.liquid +3 -2
- data/_includes/shortcodes/warning.liquid +3 -2
- data/_includes/{class/_toctree.liquid → toctree.liquid} +2 -2
- data/_layouts/default.liquid +182 -23
- data/_layouts/plugins/extension.liquid +6 -8
- data/_sass/@primer/base/base.scss +90 -0
- data/_sass/@primer/base/index.scss +6 -0
- data/_sass/@primer/base/kbd.scss +21 -0
- data/_sass/@primer/base/normalize.scss +423 -0
- data/_sass/@primer/base/typography-base.scss +100 -0
- data/_sass/@primer/breadcrumb/breadcrumb.scss +28 -0
- data/_sass/@primer/breadcrumb/index.scss +3 -0
- data/_sass/@primer/buttons/button-group.scss +91 -0
- data/_sass/@primer/buttons/button.scss +296 -0
- data/_sass/@primer/buttons/index.scss +4 -0
- data/_sass/@primer/buttons/misc.scss +205 -0
- data/_sass/@primer/forms/form-control.scss +278 -0
- data/_sass/@primer/forms/form-group.scss +279 -0
- data/_sass/@primer/forms/form-select.scss +38 -0
- data/_sass/@primer/forms/form-validation.scss +369 -0
- data/_sass/@primer/forms/index.scss +7 -0
- data/_sass/@primer/forms/input-group.scss +53 -0
- data/_sass/@primer/forms/radio-group.scss +43 -0
- data/_sass/@primer/markdown/blob-csv.scss +31 -0
- data/_sass/@primer/markdown/code.scss +73 -0
- data/_sass/@primer/markdown/headings.scss +72 -0
- data/_sass/@primer/markdown/images.scss +131 -0
- data/_sass/@primer/markdown/index.scss +8 -0
- data/_sass/@primer/markdown/lists.scss +76 -0
- data/_sass/@primer/markdown/markdown-body.scss +99 -0
- data/_sass/@primer/markdown/tables.scss +38 -0
- data/_sass/@primer/support/index.scss +11 -0
- data/_sass/@primer/support/mixins/buttons.scss +184 -0
- data/_sass/@primer/support/mixins/layout.scss +55 -0
- data/_sass/@primer/support/mixins/misc.scss +32 -0
- data/_sass/@primer/support/mixins/typography.scss +88 -0
- data/_sass/@primer/support/variables/color-system.scss +243 -0
- data/_sass/@primer/support/variables/colors.scss +55 -0
- data/_sass/@primer/support/variables/layout.scss +149 -0
- data/_sass/@primer/support/variables/misc.scss +42 -0
- data/_sass/@primer/support/variables/typography.scss +43 -0
- data/_sass/@primer/utilities/animations.scss +187 -0
- data/_sass/@primer/utilities/borders.scss +184 -0
- data/_sass/@primer/utilities/box-shadow.scss +25 -0
- data/_sass/@primer/utilities/colors.scss +185 -0
- data/_sass/@primer/utilities/details.scss +34 -0
- data/_sass/@primer/utilities/flexbox.scss +121 -0
- data/_sass/@primer/utilities/index.scss +14 -0
- data/_sass/@primer/utilities/layout.scss +134 -0
- data/_sass/@primer/utilities/margin.scss +68 -0
- data/_sass/@primer/utilities/padding.scss +59 -0
- data/_sass/@primer/utilities/typography.scss +325 -0
- data/_sass/@primer/utilities/visibility-display.scss +82 -0
- data/_sass/_font-face.scss +65 -0
- data/_sass/_icons.scss +53 -0
- data/_sass/_layout.scss +76 -0
- data/_sass/_reset.scss +21 -0
- data/_sass/_root.scss +9 -0
- data/_sass/_variables.scss +29 -0
- data/_sass/class/addons-wrap.scss +39 -0
- data/_sass/class/container.scss +11 -0
- data/_sass/class/content-wrap.scss +4 -0
- data/_sass/class/header.scss +10 -0
- data/_sass/{highlight.scss → class/highlight.scss} +0 -0
- data/_sass/class/markdown-body.scss +49 -0
- data/_sass/class/sidebar-wrap.scss +72 -0
- data/_sass/class/title.scss +13 -0
- data/_sass/theme.scss +26 -12
- data/assets/404.liquid +1 -3
- data/assets/css/theme.min.css +1 -4
- data/assets/css/theme.scss +4 -0
- data/assets/js/mermaid.min.js +6 -5
- data/assets/js/search.js +90 -0
- data/assets/js/theme.js +55 -121
- data/assets/js/theme.min.js +1 -1
- data/assets/search.liquid +9 -1
- metadata +74 -25
- data/_includes/assets/custom.js +0 -0
- data/_includes/assets/custom.scss +0 -0
- data/_includes/class/_breadcrumbs.liquid +0 -28
- data/_includes/class/_footer.liquid +0 -38
- data/_includes/class/rst-versions.liquid +0 -22
- data/_includes/class/wy-nav-content.liquid +0 -15
- data/_includes/class/wy-nav-side.liquid +0 -18
- data/_includes/class/wy-nav-top.liquid +0 -8
- data/_includes/extra/footer.html +0 -0
- data/_includes/extra/head.html +0 -0
- data/_includes/node/links.liquid +0 -24
- data/_includes/node/metadata.liquid +0 -21
- data/_includes/node/script.extension.liquid +0 -29
- data/_includes/node/script.liquid +0 -20
- data/_includes/node/script.schema.liquid +0 -27
- data/_includes/node/title.liquid +0 -1
- data/_includes/reset/i18n.liquid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15185d69e5df3312de8226fdf843da12d6f1cbc754a0b439c0be998be05fe524
|
4
|
+
data.tar.gz: ede7f10389e609983db0b3429ad717366016205c4c19447fe2db68056596d7b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1dc680274eb05e270130ec057f902794f53b622af56dfe222d194d53d0fc90e3598c16d52c0b7cf84b71f53406d81fd480be150f06c54ee3228a9fbafae49037
|
7
|
+
data.tar.gz: 611d1d5a0752e19bb708b55f3f878a1747f447e5348f7b8b98265befe6af025482275b5babfe042e7e7d21cda4140d6a900208fae9ba0f2fe2287a8a6553e70d
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,85 +1,43 @@
|
|
1
1
|
# jekyll-rtd-theme
|
2
2
|
|
3
|
-
![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)
|
4
|
-
![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)
|
3
|
+
[![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)][repository]
|
4
|
+
[![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)][cdn]
|
5
5
|
|
6
|
-
Opinionated github flavored
|
7
|
-
|
8
|
-
## What it does?
|
9
|
-
|
10
|
-
This theme(`v1`) use [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme)'s styles
|
11
|
-
|
12
|
-
Solved the issue of open source project documentation site
|
13
|
-
|
14
|
-
- No need to learn other programming languages for building documentation
|
15
|
-
- No need to care about the site SEO
|
16
|
-
- Native support for mermaid chart plugin
|
6
|
+
Opinionated github flavored documentation theme for open source projects
|
17
7
|
|
18
8
|
## Quick start
|
19
9
|
|
20
10
|
```yml
|
21
|
-
remote_theme: rundocs/jekyll-rtd-theme
|
11
|
+
remote_theme: rundocs/jekyll-rtd-theme
|
22
12
|
```
|
23
13
|
|
24
14
|
You can [generate](https://github.com/rundocs/starter-slim/generate) with the same files and folders from [rundocs/starter-slim](https://github.com/rundocs/starter-slim/)
|
25
15
|
|
26
|
-
##
|
27
|
-
|
28
|
-
```yml
|
29
|
-
title: Your awesome title
|
30
|
-
lang: # default: en
|
31
|
-
description: Write an awesome description for your new site here
|
32
|
-
|
33
|
-
readme_index:
|
34
|
-
with_frontmatter: true
|
16
|
+
## Features
|
35
17
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
18
|
+
- Automatically generate nested sidebar based on directory
|
19
|
+
- Multi-language supported
|
20
|
+
- Search engine optimized
|
21
|
+
- Document search (RegExp supported)
|
22
|
+
- Support third-party comments
|
23
|
+
- Google, Baidu, CNZZ Analytics supported
|
24
|
+
- Just need one file `_config.yml` to configure site
|
40
25
|
|
41
|
-
|
42
|
-
gtag:
|
43
|
-
adsense:
|
26
|
+
## Documents
|
44
27
|
|
45
|
-
|
46
|
-
custom: # mermaid link
|
47
|
-
initialize: # mermaid options, default: {}
|
28
|
+
For full documentation, please refer to our website ([rundocs.io](https://rundocs.io/)) for details
|
48
29
|
|
49
|
-
|
50
|
-
scss:
|
30
|
+
### test
|
51
31
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# also available via file: _data/translate.yml
|
56
|
-
translate:
|
57
|
-
# shortcodes
|
58
|
-
danger:
|
59
|
-
note:
|
60
|
-
tip:
|
61
|
-
warning:
|
62
|
-
# 404
|
63
|
-
not_found:
|
64
|
-
# search
|
65
|
-
searching:
|
66
|
-
search:
|
67
|
-
search_docs:
|
68
|
-
search_results:
|
69
|
-
search_results_found: # the "#" in this translate will replaced with results size!
|
70
|
-
search_results_not_found:
|
71
|
-
|
72
|
-
## optional plugins ##
|
73
|
-
plugins:
|
74
|
-
- jemoji
|
75
|
-
- jekyll-avatar
|
76
|
-
- jekyll-mentions
|
77
|
-
```
|
78
|
-
|
79
|
-
## Waiting
|
80
|
-
|
81
|
-
Document writing specifications, please refer to [rundocs.io](https://rundocs.io) for details
|
32
|
+
- Latest test document: [rundocs.github.io/jekyll-rtd-theme](https://rundocs.github.io/jekyll-rtd-theme)
|
33
|
+
- Preview debug branch, please refer to [rundocs.github.io/debug](https://rundocs.github.io/debug)
|
82
34
|
|
83
35
|
## The license
|
84
36
|
|
85
37
|
The theme is available as open source under the terms of the MIT License
|
38
|
+
|
39
|
+
[repository]: https://github.com/rundocs/jekyll-rtd-theme
|
40
|
+
[rubygem]: https://rubygems.org/gems/jekyll-rtd-theme
|
41
|
+
[cdn]: https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme/
|
42
|
+
[codefactor]: https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme
|
43
|
+
[gitter]: https://gitter.im/rundocs/jekyll-rtd-theme?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<dl>
|
2
|
-
<dt>{{
|
2
|
+
<dt>{{ site.data.translate.statistics | default: "Statistics" }}</dt>
|
3
3
|
<dd>
|
4
|
-
<a href="https://github.com/rundocs/analytics"
|
5
|
-
{{
|
4
|
+
<a href="https://github.com/rundocs/analytics" target="_blank">
|
5
|
+
{{ site.data.translate.total_visits | default: "Total visits" }}:
|
6
6
|
<span id="counter">
|
7
|
-
<span class="
|
7
|
+
<span class="progress"></span>
|
8
8
|
</span>
|
9
9
|
</a>
|
10
10
|
</dd>
|
@@ -1,21 +1,18 @@
|
|
1
1
|
<dl>
|
2
|
-
<dt>{{
|
2
|
+
<dt>{{ site.data.translate.github | default: "GitHub" }}</dt>
|
3
3
|
<dd>
|
4
|
-
<a href="{{
|
5
|
-
<i class="fa fa-github"></i>
|
6
|
-
{{ __.homepage | default: "Homepage" }}
|
4
|
+
<a href="{{ site.github.repository_url }}">
|
5
|
+
<i class="fa fa-github"></i> {{ site.data.translate.homepage | default: "HomePage" }}
|
7
6
|
</a>
|
8
7
|
</dd>
|
9
8
|
<dd>
|
10
|
-
<a href="{{
|
11
|
-
<i class="fa fa-question-circle-o"></i>
|
12
|
-
{{ __.issues | default: "Issues" }}
|
9
|
+
<a href="{{ site.github.issues_url }}">
|
10
|
+
<i class="fa fa-question-circle-o"></i> {{ site.data.translate.issues | default: "Issues" }}
|
13
11
|
</a>
|
14
12
|
</dd>
|
15
13
|
<dd>
|
16
|
-
<a href="{{
|
17
|
-
<i class="fa fa-download"></i>
|
18
|
-
{{ __.download | default: "Download" }}
|
14
|
+
<a href="{{ site.github.zip_url }}">
|
15
|
+
<i class="fa fa-download"></i> {{ site.data.translate.download | default: "Download" }}
|
19
16
|
</a>
|
20
17
|
</dd>
|
21
18
|
</dl>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="navigation-top d-flex flex-justify-between">
|
2
|
+
<ul class="breadcrumb" role="navigation" aria-label="breadcrumbs navigation">
|
3
|
+
<li class="breadcrumb-item">
|
4
|
+
<a href="{{ site.baseurl }}/" title="{{ site.github.source.branch }}"><i class="fa fa-home"></i></a>
|
5
|
+
</li>
|
6
|
+
{%- case page.url -%}
|
7
|
+
{%- when "/search.html" -%}
|
8
|
+
<li class="breadcrumb-item" aria-current="page">{{ site.data.translate.search | default: "Search" }}</li>
|
9
|
+
{%- when "/404.html" -%}
|
10
|
+
<li class="breadcrumb-item" aria-current="page">404</li>
|
11
|
+
{%- else -%}
|
12
|
+
{%- assign blocks = page.path | split: "/" -%}
|
13
|
+
{%- for block in blocks -%}
|
14
|
+
<li class="breadcrumb-item" {% if forloop.last %}aria-current{% endif %}>
|
15
|
+
{%- if forloop.last -%}
|
16
|
+
{{ page.name }}
|
17
|
+
{%- else -%}
|
18
|
+
<a href="{{ site.baseurl }}/{% for block in blocks limit: forloop.index %}{{ block }}/{% endfor %}">{{ block }}</a>
|
19
|
+
{%- endif -%}
|
20
|
+
</li>
|
21
|
+
{%- endfor -%}
|
22
|
+
{%- endcase -%}
|
23
|
+
</ul>
|
24
|
+
<a class="edit" href="{% github_edit_link %}" title="{{ site.data.translate.edit | default: 'Edit on GitHub'}}" target="_blank">
|
25
|
+
<i class="fa fa-edit"></i>
|
26
|
+
</a>
|
27
|
+
</div>
|
@@ -6,10 +6,10 @@
|
|
6
6
|
{%- assign size_p1 = size | plus: 1 -%}
|
7
7
|
|
8
8
|
{%- assign dir = site_pages | where: "url", workdir | first %}
|
9
|
-
{% include
|
9
|
+
{% include extend/tabs.liquid size=size %}- [{{ dir.title | default: dir.url }}]({{ dir.url | relative_url }})
|
10
10
|
|
11
11
|
{%- for item in workdir_files %}
|
12
|
-
{% include
|
12
|
+
{% include extend/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.url }}]({{ item.url | relative_url }})
|
13
13
|
{%- endfor -%}
|
14
14
|
|
15
15
|
{%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
|
File without changes
|
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
{% comment %} display the directory name {% endcomment %}
|
4
4
|
{%- assign dir = site_pages | where: "url", workdir | first -%}
|
5
|
+
|
5
6
|
{%- if workdir_level == 2 %}
|
6
7
|
{% comment %} display the root sub-directory as "p.caption" {% endcomment %}
|
7
|
-
<p class="caption
|
8
|
+
<p class="caption text-uppercase no-wrap px-2 mb-0">{{ dir.title | default: dir.url }}</p>
|
8
9
|
{%- else %}
|
9
|
-
<a class="
|
10
|
+
<a class="d-flex" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
|
10
11
|
{%- endif -%}
|
11
12
|
|
12
13
|
<ul>
|
@@ -17,8 +18,8 @@
|
|
17
18
|
{%- if page.url == item.url %}current{% endif -%}
|
18
19
|
{%- endcapture %}
|
19
20
|
|
20
|
-
<li class="
|
21
|
-
<a class="
|
21
|
+
<li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
|
22
|
+
<a class="d-flex {{ current }}" href="{{ item.url | relative_url }}">
|
22
23
|
{%- if item.sort and site.show_sorted != false -%}
|
23
24
|
{{ item.sort }}. {{ item.title | default: item.url }}
|
24
25
|
{%- else -%}
|
@@ -31,6 +32,6 @@
|
|
31
32
|
{% comment %} list dirs {% endcomment %}
|
32
33
|
{%- for workdir in workdir_dirs -%}
|
33
34
|
{%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
|
34
|
-
<li class="
|
35
|
+
<li class="toc level-{{ level }}">{% include extend/toctree.liquid %}</li>
|
35
36
|
{%- endfor -%}
|
36
37
|
</ul>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{% comment %} prev and next {% endcomment %}
|
2
|
+
{%- if page.url != "/search.html" and page.url != "/404.html" -%}
|
3
|
+
{%- if next or prev -%}
|
4
|
+
<div class="navigation-bottom d-flex flex-justify-between py-3" role="navigation" aria-label="footer navigation">
|
5
|
+
<div class="prev">
|
6
|
+
{%- if prev -%}
|
7
|
+
<a href="{{ prev.url | relative_url }}" class="btn" title="{{ prev.title }}" accesskey="p" rel="prev">
|
8
|
+
<i class="fa fa-arrow-circle-left"></i> {{ site.data.translate.previous | default: "Previous" }}
|
9
|
+
</a>
|
10
|
+
{%- endif -%}
|
11
|
+
</div>
|
12
|
+
<div class="next">
|
13
|
+
{%- if next -%}
|
14
|
+
<a href="{{ next.url | relative_url }}" class="btn" title="{{ next.title }}" accesskey="n" rel="next">
|
15
|
+
{{ site.data.translate.next | default: "Next" }} <i class="fa fa-arrow-circle-right"></i>
|
16
|
+
</a>
|
17
|
+
{%- endif -%}
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
{%- endif -%}
|
21
|
+
{%- endif -%}
|
22
|
+
|
23
|
+
<hr>
|
24
|
+
|
25
|
+
<div class="copyright text-center text-gray" role="contentinfo">
|
26
|
+
<i class="fa fa-copyright"></i>
|
27
|
+
{%- if site.rundocs.since %}{{ site.rundocs.since }}-{% endif -%}
|
28
|
+
{{- site.time | date: "%Y" }},
|
29
|
+
<a class="text-gray" href="{{ site.github.owner_url }}" target="_blank">
|
30
|
+
{{ site.github.owner_name }}
|
31
|
+
</a>
|
32
|
+
{{ site.data.translate.revision | default: "Revision" }}
|
33
|
+
<a class="text-gray" href="{{ site.github.repository_url }}/commit/{{ site.github.build_revision }}" title="{{ site.github.build_revision }}" target="_blank">
|
34
|
+
{{ site.github.build_revision | slice: 0, 7 }}
|
35
|
+
</a>
|
36
|
+
</div>
|
@@ -1,89 +1,54 @@
|
|
1
|
-
{%-
|
2
|
-
|
3
|
-
{%- include reset/site_pages.liquid -%}
|
4
|
-
{%- include reset/i18n.liquid -%}
|
5
|
-
|
6
|
-
{%- comment %} variables {% endcomment -%}
|
7
|
-
{%- assign version = "1.1.8" -%}
|
8
|
-
{%- assign docs = site.github -%}
|
9
|
-
{%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
|
1
|
+
{%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
|
2
|
+
{%- assign version = "2.0.0-beta" -%}
|
10
3
|
|
11
|
-
{%- assign
|
12
|
-
{%- assign
|
4
|
+
{%- assign schema_date = page.date | default: site.time | date_to_xmlschema -%}
|
5
|
+
{%- assign schema_modi = site.time | date_to_xmlschema -%}
|
6
|
+
{%- assign schema_surl = page.url | absolute_url | xml_escape -%}
|
13
7
|
|
14
|
-
{
|
15
|
-
{%-
|
8
|
+
{% comment %} cdn {% endcomment %}
|
9
|
+
{%- if site.debug -%}
|
10
|
+
{%- assign cdn = site.baseurl -%}
|
11
|
+
{%- else -%}
|
12
|
+
{%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
|
13
|
+
{%- endif -%}
|
16
14
|
|
17
|
-
{%-
|
18
|
-
{%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
|
19
|
-
{%- assign schema_modi = site.time | date_to_xmlschema -%}
|
20
|
-
{%- assign schema_surl = page.url | absolute_url | xml_escape -%}
|
15
|
+
{%- include reset/site_pages.liquid %}
|
21
16
|
|
22
|
-
{
|
17
|
+
{% comment %} title {% endcomment %}
|
23
18
|
{%- case page.url -%}
|
24
19
|
{%- when "/" -%}
|
25
|
-
{%- assign title = site.title | append: " · " | append: site.description
|
20
|
+
{%- assign title = site.title | append: " · " | append: site.description -%}
|
26
21
|
{%- when "/search.html" -%}
|
27
|
-
{%- assign title =
|
22
|
+
{%- assign title = __search | append: " · " | append: site.title -%}
|
28
23
|
{%- when "/404.html" -%}
|
29
|
-
{%- assign title =
|
24
|
+
{%- assign title = __404 | append: " · " | append: site.title -%}
|
30
25
|
{%- else -%}
|
31
|
-
{%- assign title = page.title | default: page.url | append: " · " | append: site.title
|
26
|
+
{%- assign title = page.title | default: page.url | append: " · " | append: site.title -%}
|
32
27
|
{%- endcase -%}
|
33
28
|
|
34
|
-
{%- comment %} description {% endcomment -%}
|
35
|
-
{%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
|
36
|
-
|
37
|
-
{% comment %} debug {% endcomment %}
|
38
|
-
{%- if site.debug -%}
|
39
|
-
{%- assign cdn = site.baseurl -%}
|
40
|
-
{%- else -%}
|
41
|
-
{%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
|
42
|
-
{%- endif -%}
|
43
|
-
|
44
29
|
{% comment %} content {% endcomment %}
|
45
30
|
{%- assign content = content
|
46
|
-
| replace:
|
47
|
-
| replace: "“", '"'
|
48
|
-
| replace: "”", '"'
|
49
|
-
| replace: '<pre class="highlight"><code>', '<pre class="highlight">'
|
50
|
-
| replace: '<pre><code', '<pre'
|
51
|
-
| replace: "</code></pre>", "</pre>"
|
52
|
-
| replace: '<code class="language-plaintext', '<code class="literal'
|
53
|
-
| replace: "<dl>", '<dl class="definition">'
|
54
|
-
| replace: "<table>", '<div class="wy-table-responsive"><table class="docutils">'
|
55
|
-
| replace: "</table>", '</table></div>'
|
31
|
+
| replace: '’', "'"
|
56
32
|
| replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
|
57
33
|
|
34
|
+
|
58
35
|
{% comment %} prev and next {% endcomment %}
|
59
36
|
{%- assign workdir_files = site_files | where_exp: "item", "item.dir == page.dir" -%}
|
60
37
|
|
61
|
-
{%- assign
|
38
|
+
{%- assign _index = 0 -%}
|
62
39
|
{%- for item in workdir_files %}
|
63
40
|
{%- if item.url == page.url %}
|
64
|
-
{%- assign
|
41
|
+
{%- assign _index = forloop.index -%}
|
65
42
|
{%- endif %}
|
66
43
|
{%- endfor -%}
|
67
44
|
|
68
45
|
{%- for item in workdir_files -%}
|
69
|
-
{%- assign
|
70
|
-
{%- assign
|
71
|
-
{%- if forloop.index ==
|
46
|
+
{%- assign _index_prev = _index | minus: 1 -%}
|
47
|
+
{%- assign _index_next = _index | plus: 1 -%}
|
48
|
+
{%- if forloop.index == _index_prev -%}
|
72
49
|
{%- assign prev = item -%}
|
73
50
|
{%- endif %}
|
74
|
-
{%- if forloop.index ==
|
51
|
+
{%- if forloop.index == _index_next and page.url != page.dir -%}
|
75
52
|
{%- assign next = item -%}
|
76
53
|
{%- endif %}
|
77
54
|
{%- endfor -%}
|
78
|
-
|
79
|
-
{% comment %} custom {% endcomment %}
|
80
|
-
{%- capture custom_script -%}
|
81
|
-
{%- include assets/custom.js -%}
|
82
|
-
{{- site.script -}}
|
83
|
-
{%- endcapture -%}
|
84
|
-
|
85
|
-
{%- capture custom_scss -%}
|
86
|
-
@import "theme.scss";
|
87
|
-
{%- include assets/custom.scss -%}
|
88
|
-
{{- site.scss -}}
|
89
|
-
{%- endcapture -%}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div class="admonition danger">
|
2
|
-
<p class="admonition-title">
|
3
|
-
|
2
|
+
<p class="admonition-title" ui="danger">
|
3
|
+
<i class="fas fa-exclamation-circle"></i>
|
4
|
+
<span class="progress"></span>
|
4
5
|
</p>
|
5
6
|
{{ codes | markdownify | strip_newlines -}}
|
6
7
|
</div>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div class="admonition note">
|
2
|
-
<p class="admonition-title">
|
3
|
-
|
2
|
+
<p class="admonition-title" ui="note">
|
3
|
+
<i class="fas fa-exclamation-circle"></i>
|
4
|
+
<span class="progress"></span>
|
4
5
|
</p>
|
5
6
|
{{ codes | markdownify | strip_newlines -}}
|
6
7
|
</div>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div class="admonition tip">
|
2
|
-
<p class="admonition-title">
|
3
|
-
|
2
|
+
<p class="admonition-title" ui="tip">
|
3
|
+
<i class="fas fa-exclamation-circle"></i>
|
4
|
+
<span class="progress"></span>
|
4
5
|
</p>
|
5
6
|
{{ codes | markdownify | strip_newlines -}}
|
6
7
|
</div>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div class="admonition warning">
|
2
|
-
<p class="admonition-title">
|
3
|
-
|
2
|
+
<p class="admonition-title" ui="warning">
|
3
|
+
<i class="fas fa-exclamation-circle"></i>
|
4
|
+
<span class="progress"></span>
|
4
5
|
</p>
|
5
6
|
{{ codes | markdownify | strip_newlines -}}
|
6
7
|
</div>
|
@@ -7,8 +7,8 @@
|
|
7
7
|
{%- capture current -%}
|
8
8
|
{%- if page.url == item.url %}current{% endif -%}
|
9
9
|
{%- endcapture %}
|
10
|
-
<li class="
|
11
|
-
<a class="
|
10
|
+
<li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
|
11
|
+
<a class="d-flex {{ current }}" href="{{ item.url | relative_url }}">
|
12
12
|
{%- if item.sort and site.show_sorted != false -%}
|
13
13
|
{{ item.sort }}. {{ item.title | default: item.url }}
|
14
14
|
{%- else -%}
|