jekyll-rtd-theme 2.0.1 → 2.0.6
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 +45 -14
- data/_includes/addons/analytics.liquid +1 -1
- data/_includes/assets/sw.caches.js +3 -7
- data/_includes/class/_breadcrumbs.liquid +1 -1
- data/_includes/class/_toctree.liquid +2 -2
- data/_includes/class/content-wrap.liquid +2 -2
- data/_includes/class/sidebar-wrap.liquid +2 -2
- data/_includes/extend/list.liquid +1 -1
- data/_includes/extend/toctree.liquid +2 -2
- data/_includes/list.liquid +1 -1
- data/_includes/node/links.liquid +33 -0
- data/_includes/{head → node}/metadata.liquid +9 -1
- data/_includes/{head → node}/script.extension.liquid +0 -0
- data/_includes/{head → node}/script.liquid +6 -3
- data/_includes/{head → node}/script.schema.liquid +0 -0
- data/_includes/{head → node}/title.liquid +0 -0
- data/_includes/reset/content.liquid +5 -0
- data/_includes/reset/defaults.liquid +6 -64
- data/_includes/reset/description.liquid +6 -0
- data/_includes/reset/navigation.liquid +20 -0
- data/_includes/reset/title.liquid +18 -0
- data/_includes/reset/variables.liquid +31 -0
- data/_includes/reset/version.liquid +1 -0
- data/_includes/shortcodes/danger.liquid +3 -3
- data/_includes/shortcodes/mermaid.liquid +1 -1
- data/_includes/shortcodes/note.liquid +3 -3
- data/_includes/shortcodes/tip.liquid +3 -3
- data/_includes/shortcodes/warning.liquid +2 -2
- data/_layouts/default.liquid +8 -9
- data/_layouts/plugins/extension.liquid +1 -2
- data/_sass/@primer/{base → css/base}/base.scss +0 -0
- data/_sass/@primer/{base → css/base}/index.scss +0 -0
- data/_sass/@primer/{base → css/base}/kbd.scss +0 -0
- data/_sass/@primer/{base → css/base}/normalize.scss +0 -0
- data/_sass/@primer/{base → css/base}/typography-base.scss +0 -0
- data/_sass/@primer/{breadcrumb → css/breadcrumb}/breadcrumb.scss +0 -0
- data/_sass/@primer/{breadcrumb → css/breadcrumb}/index.scss +0 -0
- data/_sass/@primer/{buttons → css/buttons}/button-group.scss +0 -0
- data/_sass/@primer/{buttons → css/buttons}/button.scss +0 -0
- data/_sass/@primer/{buttons → css/buttons}/index.scss +0 -0
- data/_sass/@primer/{buttons → css/buttons}/misc.scss +0 -0
- data/_sass/@primer/{forms → css/forms}/form-control.scss +6 -3
- data/_sass/@primer/{forms → css/forms}/form-group.scss +0 -0
- data/_sass/@primer/{forms → css/forms}/form-select.scss +0 -0
- data/_sass/@primer/{forms → css/forms}/form-validation.scss +0 -0
- data/_sass/@primer/{forms → css/forms}/index.scss +0 -0
- data/_sass/@primer/{forms → css/forms}/input-group.scss +0 -0
- data/_sass/@primer/{forms → css/forms}/radio-group.scss +0 -0
- data/_sass/@primer/{loaders → css/loaders}/index.scss +0 -0
- data/_sass/@primer/{loaders → css/loaders}/loaders.scss +0 -0
- data/_sass/@primer/{markdown → css/markdown}/blob-csv.scss +0 -0
- data/_sass/@primer/{markdown → css/markdown}/code.scss +0 -0
- data/_sass/@primer/{markdown → css/markdown}/headings.scss +0 -0
- data/_sass/@primer/{markdown → css/markdown}/images.scss +0 -0
- data/_sass/@primer/{markdown → css/markdown}/index.scss +0 -0
- data/_sass/@primer/{markdown → css/markdown}/lists.scss +1 -0
- data/_sass/@primer/{markdown → css/markdown}/markdown-body.scss +0 -0
- data/_sass/@primer/{markdown → css/markdown}/tables.scss +0 -0
- data/_sass/@primer/{support → css/support}/index.scss +0 -0
- data/_sass/@primer/{support → css/support}/mixins/buttons.scss +0 -0
- data/_sass/@primer/{support → css/support}/mixins/layout.scss +0 -0
- data/_sass/@primer/{support → css/support}/mixins/misc.scss +0 -0
- data/_sass/@primer/{support → css/support}/mixins/typography.scss +0 -0
- data/_sass/@primer/{support → css/support}/variables/color-system.scss +0 -0
- data/_sass/@primer/{support → css/support}/variables/colors.scss +0 -0
- data/_sass/@primer/{support → css/support}/variables/layout.scss +0 -0
- data/_sass/@primer/{support → css/support}/variables/misc.scss +1 -0
- data/_sass/@primer/{support → css/support}/variables/typography.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/animations.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/borders.scss +6 -3
- data/_sass/@primer/{utilities → css/utilities}/box-shadow.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/colors.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/details.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/flexbox.scss +3 -0
- data/_sass/@primer/{utilities → css/utilities}/index.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/layout.scss +42 -25
- data/_sass/@primer/{utilities → css/utilities}/margin.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/padding.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/typography.scss +0 -0
- data/_sass/@primer/{utilities → css/utilities}/visibility-display.scss +0 -0
- data/_sass/_font-face.scss +7 -6
- data/_sass/_variables.scss +5 -1
- data/_sass/class/markdown-body.scss +49 -4
- data/_sass/class/sidebar-wrap.scss +7 -2
- data/_sass/class/{admonition.scss → toasts.scss} +7 -1
- data/_sass/font-awesome/_icons.scss +2139 -0
- data/_sass/font-awesome/_variables.scss +799 -0
- data/_sass/material-design-lite/_color-definitions.scss +378 -0
- data/_sass/material-design-lite/_functions.scss +19 -0
- data/_sass/material-design-lite/_mixins.scss +301 -0
- data/_sass/material-design-lite/_variables.scss +612 -0
- data/_sass/{class/highlight.scss → rouge/github.scss} +0 -0
- data/_sass/theme.scss +14 -11
- data/assets/css/theme.min.css +1 -1
- data/assets/images/apple-touch-icon-300x300.png +0 -0
- data/assets/images/favicon-16x16.png +0 -0
- data/assets/images/favicon-32x32.png +0 -0
- data/assets/images/favicon-96x96.png +0 -0
- data/assets/{favicon.liquid → images/favicon.svg} +2 -7
- data/assets/js/theme.js +246 -244
- data/assets/js/theme.min.js +1 -1
- data/assets/search.liquid +1 -1
- data/assets/sw.caches.liquid +1 -1
- metadata +78 -64
- data/_includes/head/custom.liquid +0 -17
- data/_includes/head/links.liquid +0 -16
- data/_sass/_icons.scss +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27952ad7046e08fda88fe995c96373c80d617b307149f8df95f25d0cede8cb16
|
4
|
+
data.tar.gz: 2edb77830307abdd39a0ea26feeaa82051042f3ff053d2fd21e28ba43e2d8a12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1fa3733360b4df42bc458dbdc59716bb84d4b3fc02f57beb534d5117467a99ba8180294bd489c6497f4aca7b030316af291210c4d81ca71231b0ad90489689
|
7
|
+
data.tar.gz: e4e09798ff5a31039a20027b947f6f59b556fb91712510061bcd501a7b94a6fc24b926f9ad22ad24cbf5d340ee77834227494ae72f08728550b7a4840887b0be
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,23 @@
|
|
1
1
|
# jekyll-rtd-theme
|
2
2
|
|
3
|
-
![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)
|
3
|
+
![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg?branch=v2)
|
4
4
|
![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)
|
5
5
|
|
6
|
-
Opinionated github flavored standard document theme for open source projects, with few options,
|
6
|
+
Opinionated github flavored standard document theme for open source projects, with few options, but everything!
|
7
|
+
|
8
|
+
## What it does?
|
9
|
+
|
10
|
+
This theme is inspired by [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) and refactored with:
|
11
|
+
|
12
|
+
- [github-pages](https://github.com/github/pages-gem)
|
13
|
+
- [@primer/css](https://github.com/primer/css)
|
14
|
+
|
15
|
+
Give you a native GitHub experience and solved the issue of open source project documentation site
|
16
|
+
|
17
|
+
- No need to learn other programming languages for building documentation
|
18
|
+
- No need to care about the site SEO
|
19
|
+
- Markdown syntax extended
|
20
|
+
- Native support for mermaid chart plugin
|
7
21
|
|
8
22
|
## Quick start
|
9
23
|
|
@@ -17,21 +31,16 @@ You can [generate](https://github.com/rundocs/starter-slim/generate) with the sa
|
|
17
31
|
|
18
32
|
```yml
|
19
33
|
title: Your awesome title
|
20
|
-
lang: en
|
34
|
+
lang: # default: en
|
21
35
|
description: Write an awesome description for your new site here
|
22
36
|
|
23
|
-
# plugin options
|
24
37
|
readme_index:
|
25
38
|
with_frontmatter: true
|
26
39
|
|
27
|
-
|
28
|
-
# optional settings
|
40
|
+
## optional settings ##
|
29
41
|
meta:
|
30
42
|
key1: value1
|
31
43
|
key2: value2
|
32
|
-
.
|
33
|
-
.
|
34
|
-
.
|
35
44
|
|
36
45
|
google:
|
37
46
|
gtag:
|
@@ -39,17 +48,39 @@ google:
|
|
39
48
|
|
40
49
|
mermaid:
|
41
50
|
custom: # mermaid link
|
42
|
-
initialize: # mermaid options
|
43
|
-
|
44
|
-
|
45
|
-
|
51
|
+
initialize: # mermaid options, default: {}
|
52
|
+
|
53
|
+
# also available via file: _include/assets/custom.scss
|
54
|
+
scss:
|
55
|
+
|
56
|
+
# also available via file: _include/assets/custom.js
|
57
|
+
script:
|
58
|
+
|
59
|
+
# also available via file: _data/translate.yml
|
60
|
+
translate:
|
61
|
+
# shortcodes
|
62
|
+
danger:
|
63
|
+
note:
|
64
|
+
tip:
|
65
|
+
warning:
|
66
|
+
# 404
|
67
|
+
not_found:
|
68
|
+
# search
|
69
|
+
searching:
|
70
|
+
search:
|
71
|
+
search_docs:
|
72
|
+
search_results:
|
73
|
+
search_results_found: # the "#" in this translate will replaced with results size!
|
74
|
+
search_results_not_found:
|
75
|
+
|
76
|
+
## optional plugins ##
|
46
77
|
plugins:
|
47
78
|
- jemoji
|
48
79
|
- jekyll-avatar
|
49
80
|
- jekyll-mentions
|
50
81
|
```
|
51
82
|
|
52
|
-
##
|
83
|
+
## Writing
|
53
84
|
|
54
85
|
Document writing specifications, please refer to [rundocs.io](https://rundocs.io) for details
|
55
86
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<dl>
|
2
2
|
<dt>{{ __.statistics | default: "Statistics" }}</dt>
|
3
3
|
<dd>
|
4
|
-
<a href="https://github.com/rundocs/analytics" target="_blank">
|
4
|
+
<a href="https://github.com/rundocs/analytics" rel="noreferrer" target="_blank">
|
5
5
|
{{ __.total_visits | default: "Total visits" }}:
|
6
6
|
<span id="counter">
|
7
7
|
<span class="AnimatedEllipsis"></span>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
self.addEventListener("activate", function (event) {
|
2
|
-
|
2
|
+
const current = ["rundocs-{{ version }}"];
|
3
3
|
|
4
4
|
event.waitUntil(
|
5
5
|
caches.keys().then(function (keyList) {
|
6
6
|
return Promise.all(
|
7
7
|
keyList.map(function (key) {
|
8
|
-
if (
|
8
|
+
if (current.indexOf(key) === -1) {
|
9
9
|
return caches.delete(key);
|
10
10
|
}
|
11
11
|
})
|
@@ -15,11 +15,7 @@ self.addEventListener("activate", function (event) {
|
|
15
15
|
});
|
16
16
|
|
17
17
|
self.addEventListener("fetch", function (e) {
|
18
|
-
if (
|
19
|
-
/^https:\/\/cdn\.jsdelivr\.net\/gh\/rundocs\/jekyll-rtd-theme@.+/.exec(
|
20
|
-
e.request.url
|
21
|
-
)
|
22
|
-
) {
|
18
|
+
if (e.request.url.match("rundocs/jekyll-rtd-theme@{{ version }}")) {
|
23
19
|
e.respondWith(
|
24
20
|
caches.match(e.request).then(function (resp) {
|
25
21
|
if (resp !== undefined) {
|
@@ -27,7 +27,7 @@
|
|
27
27
|
{%- endfor -%}
|
28
28
|
{%- endcase -%}
|
29
29
|
</ul>
|
30
|
-
<a class="edit" href="{% github_edit_link %}" title="{{ __.edit | default: 'Edit on GitHub'}}" target="_blank">
|
30
|
+
<a class="edit" href="{% github_edit_link %}" title="{{ __.edit | default: 'Edit on GitHub'}}" rel="noreferrer" target="_blank">
|
31
31
|
<i class="fa fa-edit"></i>
|
32
32
|
</a>
|
33
33
|
</div>
|
@@ -10,9 +10,9 @@
|
|
10
10
|
<li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
|
11
11
|
<a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
|
12
12
|
{%- if item.sort -%}
|
13
|
-
{{ item.sort }}. {{ item.title | default: item.
|
13
|
+
{{ item.sort }}. {{ item.title | default: item.name }}
|
14
14
|
{%- else -%}
|
15
|
-
{{ item.title | default: item.
|
15
|
+
{{ item.title | default: item.name }}
|
16
16
|
{%- endif -%}
|
17
17
|
</a>
|
18
18
|
</li>
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<button id="toggle" class="btn-octicon p-2 m-0 text-white" type="button">
|
4
4
|
<i class="fa fa-bars"></i>
|
5
5
|
</button>
|
6
|
-
<div class="title flex-1
|
7
|
-
<a class="h4 py-1 px-2 rounded-1" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
6
|
+
<div class="title flex-1 d-flex flex-justify-center">
|
7
|
+
<a class="h4 no-underline py-1 px-2 rounded-1" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="content p-3 p-sm-5">
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<div class="sidebar-wrap overflow-hidden">
|
2
2
|
<div class="sidebar height-full overflow-y-scroll overflow-x-hidden">
|
3
3
|
<div class="header d-flex flex-column p-3 text-center">
|
4
|
-
<div class="title pb-1
|
5
|
-
<a class="h4 py-1 px-2 rounded-1" href="{{ site.baseurl }}/" title="{{ site.description }}">
|
4
|
+
<div class="title pb-1">
|
5
|
+
<a class="h4 no-underline py-1 px-2 rounded-1" href="{{ site.baseurl }}/" title="{{ site.description }}">
|
6
6
|
<i class="fa fa-home"></i> {{ site.title }}
|
7
7
|
</a>
|
8
8
|
</div>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
{% include reset/tabs.liquid size=size %}- [{{ dir.title | default: dir.url }}]({{ dir.url | relative_url }})
|
10
10
|
|
11
11
|
{%- for item in workdir_files %}
|
12
|
-
{% include reset/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.
|
12
|
+
{% include reset/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.name }}]({{ item.url | relative_url }})
|
13
13
|
{%- endfor -%}
|
14
14
|
|
15
15
|
{%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
|
@@ -25,9 +25,9 @@
|
|
25
25
|
<li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
|
26
26
|
<a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
|
27
27
|
{%- if item.sort -%}
|
28
|
-
{{ item.sort }}. {{ item.title | default: item.
|
28
|
+
{{ item.sort }}. {{ item.title | default: item.name }}
|
29
29
|
{%- else -%}
|
30
|
-
{{ item.title | default: item.
|
30
|
+
{{ item.title | default: item.name }}
|
31
31
|
{%- endif -%}
|
32
32
|
</a>
|
33
33
|
</li>
|
data/_includes/list.liquid
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
{%- include reset/workdir.liquid workdir=page.dir -%}
|
3
3
|
|
4
4
|
{%- for item in workdir_files %}
|
5
|
-
- [{{ item.title | default: item.
|
5
|
+
- [{{ item.title | default: item.name }}]({{ item.url | relative_url }})
|
6
6
|
{%- endfor -%}
|
7
7
|
|
8
8
|
{%- if include.all -%}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
{%- comment %} dns-prefetch {% endcomment %}
|
2
|
+
<link rel="dns-prefetch" href="https://rundocs-analytics.glitch.me">
|
3
|
+
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
|
4
|
+
|
5
|
+
{%- comment %} canonical link {% endcomment %}
|
6
|
+
<link rel="canonical" href="{{ schema_surl }}">
|
7
|
+
|
8
|
+
{%- if prev -%}
|
9
|
+
<link rel="prev" href="{{ prev.url | absolute_url }}">
|
10
|
+
{%- endif -%}
|
11
|
+
|
12
|
+
{%- if next -%}
|
13
|
+
<link rel="next" href="{{ next.url | absolute_url }}">
|
14
|
+
{%- endif -%}
|
15
|
+
|
16
|
+
{% comment %} theme {% endcomment %}
|
17
|
+
<link rel="stylesheet" href="{{ cdn }}/assets/css/theme{% if site.debug.dist != false %}.min{% endif %}.css">
|
18
|
+
|
19
|
+
{%- if custom_scss.size > 0 -%}
|
20
|
+
<style>{{ custom_scss | scssify | strip_newlines }}</style>
|
21
|
+
{%- endif -%}
|
22
|
+
|
23
|
+
{% comment %} favicon icon {% endcomment %}
|
24
|
+
<link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/images/favicon.svg">
|
25
|
+
{% comment %} alternate {% endcomment %}
|
26
|
+
<link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-16x16.png" sizes="16x16">
|
27
|
+
<link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-32x32.png" sizes="32x32">
|
28
|
+
<link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-96x96.png" sizes="96x96">
|
29
|
+
{% comment %} safari {% endcomment %}
|
30
|
+
<link rel="mask-icon" href="{{ site.baseurl }}/assets/images/favicon.svg" color="#2980b9">
|
31
|
+
|
32
|
+
{% comment %} apple-touch-icon {% endcomment %}
|
33
|
+
<link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/images/apple-touch-icon-300x300.png">
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<meta name="{{ meta.first }}" content="{{ meta.last }}">
|
11
11
|
{% endfor -%}
|
12
12
|
|
13
|
-
{% comment %}
|
13
|
+
{% comment %} Open Graph {% endcomment %}
|
14
14
|
<meta property="og:title" content="{{ title }}">
|
15
15
|
<meta property="og:description" content="{{ description }}">
|
16
16
|
<meta property="og:locale" content="{{ lang }}">
|
@@ -19,3 +19,11 @@
|
|
19
19
|
<meta property="article:author" content="{{ author }}">
|
20
20
|
<meta property="article:published_time" content="{{ schema_date }}">
|
21
21
|
<meta property="article:modified_time" content="{{ schema_modi }}">
|
22
|
+
|
23
|
+
{% comment %} Twitter Card {% endcomment %}
|
24
|
+
<meta name="twitter:title" content="{{ title }}">
|
25
|
+
<meta name="twitter:description" content="{{ description }}">
|
26
|
+
<meta name="twitter:card" content="summary">
|
27
|
+
<meta name="twitter:site" content="@{{ author }}">
|
28
|
+
<meta name="twitter:url" content="{{ schema_surl }}">
|
29
|
+
<meta name="twitter:creator" content="@jekyll-rtd-theme v{{ version }}">
|
File without changes
|
@@ -1,11 +1,9 @@
|
|
1
1
|
<script>
|
2
2
|
window.ui = {
|
3
|
+
collect: new URL("{{ collect }}?v={{ version }}&lang={{ lang }}"),
|
3
4
|
title: "{{ site.title }}",
|
4
|
-
lang: "{{ site.lang }}",
|
5
|
-
version: "{{ version }}",
|
6
5
|
baseurl: "{{ site.baseurl }}",
|
7
6
|
i18n: {
|
8
|
-
search_docs: "{{ __.search_docs | default: 'Search Docs' }}",
|
9
7
|
search_results: "{{ __.search_results | default: 'Search Results' }}",
|
10
8
|
search_results_found: "{{ __.search_results_found | default: 'Search finished, found # page(s) matching the search query.' }}",
|
11
9
|
search_results_not_found: "{{ __.search_results_not_found | default: 'Your search did not match any documents, please make sure that all characters are spelled correctly!' }}"
|
@@ -13,4 +11,9 @@
|
|
13
11
|
};
|
14
12
|
</script>
|
15
13
|
<script src="{{ cdn }}/assets/js/jquery.min.js"></script>
|
14
|
+
|
15
|
+
{%- if custom_script.size > 0 -%}
|
16
|
+
<script>{{ custom_script }}</script>
|
17
|
+
{%- endif -%}
|
18
|
+
|
16
19
|
<script src="{{ cdn }}/assets/js/theme{% if site.debug.dist != false %}.min{% endif %}.js"></script>
|
File without changes
|
File without changes
|
@@ -1,69 +1,11 @@
|
|
1
1
|
{%- include reset/site_pages.liquid -%}
|
2
2
|
{%- include reset/i18n.liquid -%}
|
3
|
+
{%- include reset/version.liquid -%}
|
3
4
|
|
4
|
-
{%-
|
5
|
-
{%- assign version = "2.0.1" -%}
|
6
|
-
{%- assign docs = site.github -%}
|
7
|
-
{%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
|
5
|
+
{%- include reset/variables.liquid -%}
|
8
6
|
|
9
|
-
{%-
|
10
|
-
{%- assign rest_updated_at = rest.updated_at | default: site.time -%}
|
7
|
+
{%- include reset/content.liquid -%}
|
11
8
|
|
12
|
-
{%-
|
13
|
-
{%-
|
14
|
-
|
15
|
-
{%- comment %} schema {% endcomment -%}
|
16
|
-
{%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
|
17
|
-
{%- assign schema_modi = site.time | date_to_xmlschema -%}
|
18
|
-
{%- assign schema_surl = page.url | absolute_url | xml_escape -%}
|
19
|
-
|
20
|
-
{%- comment %} title {% endcomment -%}
|
21
|
-
{%- case page.url -%}
|
22
|
-
{%- when "/" -%}
|
23
|
-
{%- assign title = site.title | append: " · " | append: site.description | truncate: 110 -%}
|
24
|
-
{%- when "/search.html" -%}
|
25
|
-
{%- assign title = __.search | default: "Search" | append: " · " | append: site.title | truncate: 110 -%}
|
26
|
-
{%- when "/404.html" -%}
|
27
|
-
{%- assign title = "404" | append: " · " | append: site.title | truncate: 110 -%}
|
28
|
-
{%- else -%}
|
29
|
-
{%- assign title = page.title | default: page.url | append: " · " | append: site.title | truncate: 110 -%}
|
30
|
-
{%- endcase -%}
|
31
|
-
|
32
|
-
{%- comment %} description {% endcomment -%}
|
33
|
-
{%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
|
34
|
-
|
35
|
-
{% comment %} debug {% endcomment %}
|
36
|
-
{%- if site.debug -%}
|
37
|
-
{%- assign cdn = site.baseurl -%}
|
38
|
-
{%- else -%}
|
39
|
-
{%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
|
40
|
-
{%- endif -%}
|
41
|
-
|
42
|
-
{% comment %} content {% endcomment %}
|
43
|
-
{%- assign content = content
|
44
|
-
| replace: '’', "'"
|
45
|
-
| replace: "“", '"'
|
46
|
-
| replace: '”', '"'
|
47
|
-
| replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
|
48
|
-
|
49
|
-
|
50
|
-
{% comment %} prev and next {% endcomment %}
|
51
|
-
{%- assign workdir_files = site_files | where_exp: "item", "item.dir == page.dir" -%}
|
52
|
-
|
53
|
-
{%- assign index = 0 -%}
|
54
|
-
{%- for item in workdir_files %}
|
55
|
-
{%- if item.url == page.url %}
|
56
|
-
{%- assign index = forloop.index -%}
|
57
|
-
{%- endif %}
|
58
|
-
{%- endfor -%}
|
59
|
-
|
60
|
-
{%- for item in workdir_files -%}
|
61
|
-
{%- assign index_prev = index | minus: 1 -%}
|
62
|
-
{%- assign index_next = index | plus: 1 -%}
|
63
|
-
{%- if forloop.index == index_prev -%}
|
64
|
-
{%- assign prev = item -%}
|
65
|
-
{%- endif %}
|
66
|
-
{%- if forloop.index == index_next -%}
|
67
|
-
{%- assign next = item -%}
|
68
|
-
{%- endif %}
|
69
|
-
{%- endfor -%}
|
9
|
+
{%- include reset/navigation.liquid -%}
|
10
|
+
{%- include reset/title.liquid -%}
|
11
|
+
{%- include reset/description.liquid -%}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{%- include reset/workdir.liquid workdir=page.dir -%}
|
2
|
+
|
3
|
+
{% comment %} prev and next {% endcomment %}
|
4
|
+
{%- assign index = 0 -%}
|
5
|
+
{%- for item in workdir_files %}
|
6
|
+
{%- if item.url == page.url %}
|
7
|
+
{%- assign index = forloop.index -%}
|
8
|
+
{%- endif %}
|
9
|
+
{%- endfor -%}
|
10
|
+
|
11
|
+
{%- for item in workdir_files -%}
|
12
|
+
{%- assign index_prev = index | minus: 1 -%}
|
13
|
+
{%- assign index_next = index | plus: 1 -%}
|
14
|
+
{%- if forloop.index == index_prev -%}
|
15
|
+
{%- assign prev = item -%}
|
16
|
+
{%- endif %}
|
17
|
+
{%- if forloop.index == index_next -%}
|
18
|
+
{%- assign next = item -%}
|
19
|
+
{%- endif %}
|
20
|
+
{%- endfor -%}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{%- case page.url -%}
|
2
|
+
{%- when "/" -%}
|
3
|
+
{%- assign title = site.title
|
4
|
+
| append: " · "
|
5
|
+
| append: site.description | truncate: 110 -%}
|
6
|
+
{%- when "/search.html" -%}
|
7
|
+
{%- assign title = __.search | default: "Search"
|
8
|
+
| append: " · "
|
9
|
+
| append: site.title | truncate: 110 -%}
|
10
|
+
{%- when "/404.html" -%}
|
11
|
+
{%- assign title = "404"
|
12
|
+
| append: " · "
|
13
|
+
| append: site.title | truncate: 110 -%}
|
14
|
+
{%- else -%}
|
15
|
+
{%- assign title = page.title | default: page.name
|
16
|
+
| append: " · "
|
17
|
+
| append: site.title | truncate: 110 -%}
|
18
|
+
{%- endcase -%}
|