jekyll-rtd-theme 0.1.6 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -9
- data/_includes/addons.liquid +8 -2
- data/_includes/addons/analytics/google.liquid +15 -1
- data/_includes/addons/source/i18n.liquid +13 -0
- data/_includes/album.liquid +7 -0
- data/_includes/assets/custom.js +0 -0
- data/_includes/assets/custom.scss +0 -0
- data/_includes/assets/site.js +125 -0
- data/_includes/breadcrumbs.liquid +8 -2
- data/_includes/extend/list.liquid +6 -6
- data/_includes/extend/toctree.liquid +17 -7
- data/_includes/footer.liquid +3 -0
- data/_includes/i18n/{en.liquid → en-US.liquid} +7 -4
- data/_includes/i18n/{zh.liquid → zh-CN.liquid} +8 -5
- data/_includes/list.liquid +4 -4
- data/_includes/reset/defaults.liquid +88 -0
- data/_includes/reset/i18n.liquid +22 -2
- data/_includes/reset/schema.liquid +6 -0
- data/_includes/reset/site_pages.liquid +8 -0
- data/_includes/reset/workdir.liquid +32 -0
- data/_includes/searchbox.liquid +1 -3
- data/_includes/toctree.liquid +3 -3
- data/_layouts/basic.liquid +108 -0
- data/_layouts/default.liquid +2 -109
- data/_sass/_album.scss +25 -0
- data/_sass/_embed.scss +23 -0
- data/_sass/{style.scss → site.scss} +16 -1
- data/assets/404.liquid +9 -0
- data/assets/css/rougify/base16.css +1 -0
- data/assets/css/rougify/base16.dark.css +1 -0
- data/assets/css/rougify/base16.light.css +1 -0
- data/assets/css/rougify/base16.monokai.css +1 -0
- data/assets/css/rougify/base16.monokai.dark.css +1 -0
- data/assets/css/rougify/base16.monokai.light.css +1 -0
- data/assets/css/rougify/base16.solarized.css +1 -0
- data/assets/css/rougify/base16.solarized.dark.css +1 -0
- data/assets/css/rougify/base16.solarized.light.css +1 -0
- data/assets/css/rougify/bw.css +1 -0
- data/assets/css/rougify/colorful.css +1 -0
- data/assets/css/rougify/github.css +1 -0
- data/assets/css/rougify/gruvbox.css +1 -0
- data/assets/css/rougify/gruvbox.dark.css +1 -0
- data/assets/css/rougify/gruvbox.light.css +1 -0
- data/assets/css/rougify/igorpro.css +1 -0
- data/assets/css/rougify/magritte.css +1 -0
- data/assets/css/rougify/molokai.css +1 -0
- data/assets/css/rougify/monokai.css +1 -0
- data/assets/css/rougify/monokai.sublime.css +1 -0
- data/assets/css/rougify/pastie.css +1 -0
- data/assets/css/rougify/thankful_eyes.css +1 -0
- data/assets/css/rougify/tulip.css +1 -0
- data/assets/pages.json +6 -0
- data/assets/search.liquid +12 -0
- data/assets/sitemap.xml +4 -4
- metadata +45 -48
- data/_includes/assets/404.liquid +0 -5
- data/_includes/assets/data.liquid +0 -12
- data/_includes/assets/js/script.js +0 -65
- data/_includes/assets/search.liquid +0 -5
- data/_includes/reset/content.liquid +0 -7
- data/_includes/reset/html.liquid +0 -9
- data/_includes/reset/navigation.liquid +0 -19
- data/_includes/reset/snippets.liquid +0 -11
- data/_includes/reset/start.liquid +0 -7
- data/_includes/reset/title.liquid +0 -10
- data/_includes/reset/variables.liquid +0 -28
- data/_includes/reset/workspace.liquid +0 -17
- data/_sass/embed.scss +0 -25
- data/_sass/rougify/base16.dark.scss +0 -78
- data/_sass/rougify/base16.light.scss +0 -77
- data/_sass/rougify/base16.monokai.dark.scss +0 -78
- data/_sass/rougify/base16.monokai.light.scss +0 -77
- data/_sass/rougify/base16.monokai.scss +0 -78
- data/_sass/rougify/base16.scss +0 -77
- data/_sass/rougify/base16.solarized.dark.scss +0 -78
- data/_sass/rougify/base16.solarized.light.scss +0 -77
- data/_sass/rougify/base16.solarized.scss +0 -77
- data/_sass/rougify/bw.scss +0 -63
- data/_sass/rougify/colorful.scss +0 -170
- data/_sass/rougify/github.scss +0 -209
- data/_sass/rougify/gruvbox.dark.scss +0 -84
- data/_sass/rougify/gruvbox.light.scss +0 -84
- data/_sass/rougify/gruvbox.scss +0 -84
- data/_sass/rougify/igorpro.scss +0 -32
- data/_sass/rougify/magritte.scss +0 -167
- data/_sass/rougify/molokai.scss +0 -208
- data/_sass/rougify/monokai.scss +0 -210
- data/_sass/rougify/monokai.sublime.scss +0 -198
- data/_sass/rougify/pastie.scss +0 -146
- data/_sass/rougify/thankful_eyes.scss +0 -172
- data/_sass/rougify/tulip.scss +0 -163
- data/assets/404.md +0 -5
- data/assets/data.json +0 -6
- data/assets/search.md +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb6951c99db8b05f676775f3d340a5ee35053b7f9a3eb4d475a8b5c60cf4b835
|
4
|
+
data.tar.gz: 0cb3eabfc0e92c3d35e83538757b9c43d7c450a1343892bfecaac16bdf5f0553
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0b4d12c7fb8a28302bf151a0767dfa73db9e280947a0deb5147b2a164ec6efa33c01b20108186f44914d7144c71827ac37e68cb2416ed56ac9833b7892db30d
|
7
|
+
data.tar.gz: ade5cf7162131e9d927baf5f4381882f98ad586c7a8c9b0cf9fb8ad07eead5598215567596ba53e01cd7fc4771a20c754d7e443cd7c90ea29803f3461916ebc2
|
data/README.md
CHANGED
@@ -1,16 +1,17 @@
|
|
1
|
-
#
|
2
|
-
[![](https://github.com/rundocs/jekyll-rtd-theme/workflows/
|
1
|
+
# Jekyll-rtd-theme
|
2
|
+
[![](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)][repository]
|
3
3
|
[![](https://img.shields.io/gem/v/jekyll-rtd-theme)][rubygem]
|
4
4
|
[![](https://img.shields.io/gem/dt/jekyll-rtd-theme)][rubygem]
|
5
5
|
[![](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)][cdn]
|
6
6
|
[![](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme/badge)][codefactor]
|
7
|
+
[![](https://img.shields.io/badge/featured%20on-JekyllThemes-red.svg)](https://jekyll-themes.com)
|
7
8
|
|
8
|
-
Just another
|
9
|
+
Just another documentation theme compatible with GitHub Pages, based on sphinx_rtd_theme
|
9
10
|
|
10
11
|
![][demo]
|
11
12
|
|
12
13
|
## Notable features
|
13
|
-
- Write documents directly,
|
14
|
+
- Write documents directly, automatically generate toctree based on directory
|
14
15
|
- Only need one file `_config.yml` to configure site
|
15
16
|
- Bundled as a "theme gem" for easier installation/upgrading.
|
16
17
|
- Compatible with GitHub Pages.
|
@@ -19,23 +20,23 @@ Just another Jekyll theme for GitHub Pages based on ReadtheDocs's sphinx_rtd_the
|
|
19
20
|
- Search engine support
|
20
21
|
- Commenting support
|
21
22
|
- Google,Baidu,CNZZ Analytics support.
|
22
|
-
- UI localized text in English(default), Chinese(中文)
|
23
|
+
- UI localized text in English(default), Chinese(中文)...
|
23
24
|
- And many features waiting for you to discover.
|
24
25
|
|
25
26
|
## Roadmap
|
26
27
|
See the [open issues][issues] for a list of proposed features (and known issues).
|
27
28
|
|
28
29
|
## Documents
|
29
|
-
For full documentation, see: [https://
|
30
|
+
For full documentation, see: [https://jekyll-rtd-theme.rundocs.io][site]
|
30
31
|
|
31
32
|
## The License
|
32
33
|
The theme is available as open source under the terms of the [MIT License][license].
|
33
34
|
|
34
35
|
|
35
36
|
[repository]: https://github.com/rundocs/jekyll-rtd-theme
|
36
|
-
[issues]:
|
37
|
-
[license]:
|
38
|
-
[site]: https://
|
37
|
+
[issues]: https://github.com/rundocs/jekyll-rtd-theme/issues
|
38
|
+
[license]: https://github.com/rundocs/jekyll-rtd-theme/blob/master/LICENSE
|
39
|
+
[site]: https://jekyll-rtd-theme.rundocs.io
|
39
40
|
[rubygem]: https://rubygems.org/gems/jekyll-rtd-theme
|
40
41
|
[cdn]: https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme/
|
41
42
|
[codefactor]: https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme
|
data/_includes/addons.liquid
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
2
2
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
3
|
-
<span class="fa fa-book">
|
4
|
-
|
3
|
+
<span class="fa fa-book">
|
4
|
+
{% if site.url contains "rundocs.io" -%}
|
5
|
+
RunDocs
|
6
|
+
{%- else -%}
|
7
|
+
{{ site.title }}
|
8
|
+
{%- endif -%}
|
9
|
+
</span>
|
10
|
+
{% if site.addons_branch %}v: {{ branch }}{% endif %}
|
5
11
|
<span class="fa fa-caret-down"></span>
|
6
12
|
</span>
|
7
13
|
<div class="rst-other-versions">
|
@@ -1,3 +1,17 @@
|
|
1
|
+
{%- if site.url contains "rundocs.io" -%}
|
2
|
+
<!-- RunDocs Analytics -->
|
3
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-174262874-1"></script>
|
4
|
+
<script>
|
5
|
+
window.dataLayer = window.dataLayer || [];
|
6
|
+
|
7
|
+
function gtag() {
|
8
|
+
dataLayer.push(arguments);
|
9
|
+
}
|
10
|
+
gtag("js", new Date());
|
11
|
+
gtag("config", "UA-174262874-1");
|
12
|
+
</script>
|
13
|
+
{%- endif -%}
|
14
|
+
|
1
15
|
{%- if site.google.gtag -%}
|
2
16
|
<!-- Google Analytics -->
|
3
17
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google.gtag }}"></script>
|
@@ -15,4 +29,4 @@
|
|
15
29
|
{%- if site.google.adsense -%}
|
16
30
|
<!-- Google AdSense -->
|
17
31
|
<script data-ad-client="{{ site.google.adsense }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
18
|
-
{%- endif -%}
|
32
|
+
{%- endif -%}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<dl>
|
2
|
+
<dt>{{ __translations }}</dt>
|
3
|
+
{%- for item in site_langs -%}
|
4
|
+
<dd>
|
5
|
+
{%- if item == site_lang -%}
|
6
|
+
{%- assign url = "" -%}
|
7
|
+
{%- else -%}
|
8
|
+
{%- assign url = item | append: "/" -%}
|
9
|
+
{%- endif -%}
|
10
|
+
<a href="{{ site.baseurl }}/{{ url }}"><i class="fa fa-language"></i> {{ item }}</a>
|
11
|
+
</dd>
|
12
|
+
{%- endfor -%}
|
13
|
+
</dl>
|
File without changes
|
File without changes
|
@@ -0,0 +1,125 @@
|
|
1
|
+
function feedback(type, message) {
|
2
|
+
console.log(`feedback: https://github.com/rundocs/jekyll-rtd-theme/issues?q=${type}+${message}`);
|
3
|
+
}
|
4
|
+
|
5
|
+
function highlight() {
|
6
|
+
let text = new URL(location.href).searchParams.get("highlight");
|
7
|
+
let regexp = new RegExp(text, "im");
|
8
|
+
|
9
|
+
if (text) {
|
10
|
+
$(".section").find("*").each(function() {
|
11
|
+
if (this.outerHTML.match(regexp)) {
|
12
|
+
$(this).addClass("highlighted-box");
|
13
|
+
}
|
14
|
+
});
|
15
|
+
$(".section").find(".highlighted-box").each(function() {
|
16
|
+
if (($(this).find(".highlighted-box").length > 0)) {
|
17
|
+
$(this).removeClass("highlighted-box");
|
18
|
+
}
|
19
|
+
});
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
function search(data) {
|
24
|
+
let text = new URL(location.href).searchParams.get("q");
|
25
|
+
let results = [];
|
26
|
+
let regexp = new RegExp(text, "im");
|
27
|
+
|
28
|
+
function slice(content, min, max) {
|
29
|
+
return content.slice(min, max).replace(regexp, (match) => `<span class="highlighted">${match}</span>`);
|
30
|
+
}
|
31
|
+
for (page of data) {
|
32
|
+
let [title, content] = [null, null];
|
33
|
+
try {
|
34
|
+
if (page.title) {
|
35
|
+
title = page.title.match(regexp);
|
36
|
+
} else {
|
37
|
+
if (page.url == "/") {
|
38
|
+
page.title = "{{ site.title }}";
|
39
|
+
} else {
|
40
|
+
page.title = page.url;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
} catch (e) {
|
44
|
+
feedback("search", e.message);
|
45
|
+
}
|
46
|
+
try {
|
47
|
+
if (page.content) {
|
48
|
+
page.content = $("<div/>").html(page.content).text();
|
49
|
+
content = page.content.match(regexp);
|
50
|
+
}
|
51
|
+
} catch (e) {
|
52
|
+
feedback("search", e.message);
|
53
|
+
}
|
54
|
+
if (title || content) {
|
55
|
+
let result = [`<a href="{{ site.baseurl }}${page.url}?highlight=${text}">${page.title}</a>`];
|
56
|
+
if (content) {
|
57
|
+
let [min, max] = [content.index - 100, content.index + 100];
|
58
|
+
let [prefix, suffix] = ["...", "..."];
|
59
|
+
|
60
|
+
if (min < 0) {
|
61
|
+
prefix = "";
|
62
|
+
min = 0;
|
63
|
+
}
|
64
|
+
if (max > page.content.length) {
|
65
|
+
suffix = "";
|
66
|
+
max = page.content.length;
|
67
|
+
}
|
68
|
+
result.push(`<p class="context">${prefix}${slice(page.content ,min, max)}${suffix}</p>`);
|
69
|
+
}
|
70
|
+
results.push(`<li>${result.join("")}</li>`);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
if (results.length > 0 && text.length > 0) {
|
74
|
+
$("#search-results ul.search").html(results.join(""));
|
75
|
+
$("#search-results p.search-summary").html("{{ __search_results_found }}".replace("#", results.length));
|
76
|
+
} else {
|
77
|
+
$("#search-results ul.search").empty();
|
78
|
+
$("#search-results p.search-summary").html("{{ __search_results_not_found }}");
|
79
|
+
}
|
80
|
+
$("#rtd-search-form [name='q']").val(text);
|
81
|
+
$("#search-results h2").html("{{ __search_results }}");
|
82
|
+
}
|
83
|
+
|
84
|
+
function reset() {
|
85
|
+
const link = $(".wy-menu-vertical").find(`[href="${location.pathname}"]`);
|
86
|
+
if (link.length > 0) {
|
87
|
+
$(".wy-menu-vertical .current").removeClass("current");
|
88
|
+
link.addClass("current");
|
89
|
+
link.closest("li.toctree-l1").parent().addClass("current");
|
90
|
+
link.closest("li.toctree-l1").addClass("current");
|
91
|
+
link.closest("li.toctree-l2").addClass("current");
|
92
|
+
link.closest("li.toctree-l3").addClass("current");
|
93
|
+
link.closest("li.toctree-l4").addClass("current");
|
94
|
+
link.closest("li.toctree-l5").addClass("current");
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
function admonition() {
|
99
|
+
const items = {
|
100
|
+
note: "{{ __note }}",
|
101
|
+
tip: "{{ __tip }}",
|
102
|
+
warning: "{{ __warning }}",
|
103
|
+
danger: "{{ __danger }}"
|
104
|
+
};
|
105
|
+
for (let item in items) {
|
106
|
+
let content = $(`.language-${item}`).html();
|
107
|
+
$(`.language-${item}`).replaceWith(`<div class="admonition ${item}"><p class="admonition-title">${items[item]}</p><p>${content}</p></div>`);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
$(document).ready(function() {
|
112
|
+
if (location.pathname == "{{ site.baseurl }}/search.html") {
|
113
|
+
$.ajax({
|
114
|
+
dataType: "json",
|
115
|
+
url: "{{ site.baseurl }}/pages.json"
|
116
|
+
})
|
117
|
+
.done(search)
|
118
|
+
.fail((xhr, message) => feedback("search", message));
|
119
|
+
}
|
120
|
+
admonition();
|
121
|
+
anchors.add();
|
122
|
+
highlight();
|
123
|
+
SphinxRtdTheme.Navigation.reset = reset;
|
124
|
+
SphinxRtdTheme.Navigation.enable(true);
|
125
|
+
});
|
@@ -22,14 +22,20 @@
|
|
22
22
|
{{ site.baseurl }}/{% for block in blocks limit: forloop.index %}{{ block | append: "/" }}{% endfor %}
|
23
23
|
{%- endcapture %}
|
24
24
|
<li>
|
25
|
-
<a href="{{ href }}">
|
25
|
+
<a href="{{ href }}">
|
26
|
+
{%- if block == lang -%}
|
27
|
+
{{ block }}
|
28
|
+
{%- else -%}
|
29
|
+
{{ block | capitalize }}
|
30
|
+
{%- endif -%}
|
31
|
+
</a><i class="fa fa-angle-double-right"></i>
|
26
32
|
</li>
|
27
33
|
{%- endif -%}
|
28
34
|
{%- endfor -%}
|
29
35
|
{%- endcase %}
|
30
36
|
{%- if site.edit -%}
|
31
37
|
<li class="wy-breadcrumbs-aside">
|
32
|
-
<a href="{{ github_edit_link }}" class="fa fa-
|
38
|
+
<a href="{{ github_edit_link }}" class="fa fa-edit" target="_blank"></a>
|
33
39
|
</li>
|
34
40
|
{%- endif -%}
|
35
41
|
</ul>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
{%- include reset/
|
2
|
-
{%- include reset/
|
1
|
+
{%- include reset/site_pages.liquid -%}
|
2
|
+
{%- include reset/workdir.liquid -%}
|
3
3
|
|
4
4
|
{%- assign base = page.dir | append: "temp/" | split: "/" | size -%}
|
5
|
-
{%- assign size =
|
5
|
+
{%- assign size = workdir_level | minus: base -%}
|
6
6
|
{%- assign size_p1 = size | plus: 1 -%}
|
7
7
|
|
8
|
-
{%- assign dir =
|
8
|
+
{%- assign dir = site_pages | where: "url", workdir | first %}
|
9
9
|
{% include extend/tabs.liquid size=size %}- [{{ dir.title | default: dir.url }}]({{ site.baseurl | append: dir.url }})
|
10
10
|
|
11
|
-
{%- for item in
|
11
|
+
{%- for item in workdir_files %}
|
12
12
|
{% include extend/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.url }}]({{ site.baseurl | append: item.url }})
|
13
13
|
{%- endfor -%}
|
14
14
|
|
15
|
-
{%- for
|
15
|
+
{%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
|
@@ -1,29 +1,39 @@
|
|
1
|
-
{%- include reset/
|
1
|
+
{%- include reset/workdir.liquid %}
|
2
2
|
|
3
|
-
{%- assign dir =
|
4
|
-
{%- if
|
3
|
+
{%- assign dir = site_pages | where: "url", workdir | first -%}
|
4
|
+
{%- if site_lang != lang -%}
|
5
|
+
{%- assign workdir_level = workdir_level | minus: 1 -%}
|
6
|
+
{%- endif -%}
|
7
|
+
{%- if workdir_level == 2 %}
|
5
8
|
<p class="caption"><span class="caption-text">{{ dir.title | default: dir.url }}</span></p>
|
6
9
|
{%- else %}
|
7
10
|
<a class="reference internal" href="{{ site.baseurl | append: dir.url }}">{{ dir.title | default: dir.url }}</a>
|
8
11
|
{%- endif -%}
|
9
12
|
|
10
13
|
<ul>
|
11
|
-
{%- for item in
|
14
|
+
{%- for item in workdir_files -%}
|
12
15
|
{%- assign level = item.dir | append: "temp/" | split: "/" | size | minus: 2 -%}
|
13
16
|
{%- capture current -%}
|
14
17
|
{%- if page.url == item.url %}current{% endif -%}
|
15
18
|
{%- endcapture %}
|
19
|
+
{%- if site_lang != lang -%}
|
20
|
+
{%- assign level = level | minus: 1 -%}
|
21
|
+
{%- endif -%}
|
22
|
+
|
16
23
|
<li class="toctree-l{{ level }} {{ current }}">
|
17
24
|
<a class="reference internal {{ current }}" href="{{ site.baseurl | append: item.url }}">
|
18
|
-
{%- if item.sort -%}
|
25
|
+
{%- if item.sort and site.show_sorted != false -%}
|
19
26
|
{{ item.sort }}.
|
20
27
|
{%- endif %}
|
21
28
|
{{ item.title | default: item.url }}
|
22
29
|
</a>
|
23
30
|
</li>
|
24
31
|
{%- endfor -%}
|
25
|
-
{%- for
|
26
|
-
{%- assign level =
|
32
|
+
{%- for workdir in workdir_dirs -%}
|
33
|
+
{%- assign level = workdir | append: "temp/" | split: "/" | size | minus: 3 %}
|
34
|
+
{%- if site_lang != lang -%}
|
35
|
+
{%- assign level = level | minus: 1 -%}
|
36
|
+
{%- endif -%}
|
27
37
|
<li class="toctree-l{{ level }}">{% include extend/toctree.liquid %}</li>
|
28
38
|
{%- endfor -%}
|
29
39
|
</ul>
|
data/_includes/footer.liquid
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
{%- assign __issues = "Issues" -%}
|
4
4
|
{%- assign __download = "Download" -%}
|
5
5
|
{%- assign __gems = "Gems" -%}
|
6
|
+
{%- assign __translations = "Translations" -%}
|
6
7
|
{%- assign __statistics = "Statistics" -%}
|
7
8
|
{%- assign __total_visits = "Total visits:" -%}
|
8
9
|
|
@@ -13,13 +14,15 @@
|
|
13
14
|
|
14
15
|
{%- assign __next = "Next" -%}
|
15
16
|
{%- assign __previous = "Previous" -%}
|
16
|
-
{%- assign __edit = "Edit on GitHub" -%}
|
17
17
|
{%- assign __copyright = "Copyright" -%}
|
18
18
|
{%- assign __revision = "Revision" -%}
|
19
19
|
|
20
|
+
{%- assign __404 = "404" -%}
|
21
|
+
{%- assign __not_found = "This page does not exist yet!" -%}
|
22
|
+
|
23
|
+
{%- assign __searching = "Searching" -%}
|
20
24
|
{%- assign __search = "Search" -%}
|
21
25
|
{%- assign __search_docs = "Search Docs" -%}
|
22
26
|
{%- assign __search_results = "Search Results" -%}
|
23
|
-
|
24
|
-
{%- assign
|
25
|
-
{%- assign __no_results_found = "No results found!" -%}
|
27
|
+
{%- assign __search_results_found = "Search finished, found # page(s) matching the search query." -%}
|
28
|
+
{%- assign __search_results_not_found = "Your search did not match any documents, please make sure that all words are spelled correctly!" -%}
|
@@ -2,7 +2,8 @@
|
|
2
2
|
{%- assign __homepage = "仓库" -%}
|
3
3
|
{%- assign __issues = "反馈" -%}
|
4
4
|
{%- assign __download = "下载" -%}
|
5
|
-
{%- assign __gems = "
|
5
|
+
{%- assign __gems = "主题插件" -%}
|
6
|
+
{%- assign __translations = "文档翻译" -%}
|
6
7
|
{%- assign __statistics = "访问统计" -%}
|
7
8
|
{%- assign __total_visits = "累计浏览次数:" -%}
|
8
9
|
|
@@ -13,13 +14,15 @@
|
|
13
14
|
|
14
15
|
{%- assign __next = "下一篇" -%}
|
15
16
|
{%- assign __previous = "上一篇" -%}
|
16
|
-
{%- assign __edit = "" -%}
|
17
17
|
{%- assign __copyright = "版权所有" -%}
|
18
18
|
{%- assign __revision = "修订版本" -%}
|
19
19
|
|
20
|
+
{%- assign __404 = "404" -%}
|
21
|
+
{%- assign __not_found = "此页面尚不存在!" -%}
|
22
|
+
|
23
|
+
{%- assign __searching = "正在搜索" -%}
|
20
24
|
{%- assign __search = "搜索" -%}
|
21
25
|
{%- assign __search_docs = "搜索文档" -%}
|
22
26
|
{%- assign __search_results = "搜索结果" -%}
|
23
|
-
|
24
|
-
{%- assign
|
25
|
-
{%- assign __no_results_found = "查询结果为空!" -%}
|
27
|
+
{%- assign __search_results_found = "搜索完成, 找到与搜索查询匹配的#个页面" -%}
|
28
|
+
{%- assign __search_results_not_found = "您的搜索没有匹配到任何文档, 请确保所有字符拼写正确!" -%}
|
data/_includes/list.liquid
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
{%- include reset/
|
2
|
-
{%- include reset/
|
1
|
+
{%- include reset/site_pages.liquid -%}
|
2
|
+
{%- include reset/workdir.liquid workdir=page.dir -%}
|
3
3
|
|
4
|
-
{%- for item in
|
4
|
+
{%- for item in workdir_files %}
|
5
5
|
- [{{ item.title | default: item.url }}]({{ site.baseurl | append: item.url }})
|
6
6
|
{%- endfor -%}
|
7
7
|
|
8
8
|
{%- if include.all -%}
|
9
|
-
{%- for
|
9
|
+
{%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
|
10
10
|
{%- endif -%}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
{%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
|
2
|
+
{%- assign version = "1.0.1" -%}
|
3
|
+
{%- assign addons = "github, i18n, gems, analytics" | split: ", " -%}
|
4
|
+
|
5
|
+
{%- include reset/site_pages.liquid %}
|
6
|
+
{%- include reset/i18n.liquid -%}
|
7
|
+
{%- include reset/schema.liquid -%}
|
8
|
+
|
9
|
+
{% comment %} github-metadata {% endcomment %}
|
10
|
+
{%- if jekyll.environment != "production" -%}
|
11
|
+
{%- assign author = site.author | default: "[author]" -%}
|
12
|
+
{%- assign branch = "[branch]" -%}
|
13
|
+
{%- assign commit = "[commit]" -%}
|
14
|
+
{%- assign repository_url = "#" -%}
|
15
|
+
{%- assign issues_url = "#" -%}
|
16
|
+
{%- assign zip_url = "#" -%}
|
17
|
+
{%- assign github_edit_link = "#" -%}
|
18
|
+
{%- else -%}
|
19
|
+
{%- assign author = site.author | default: site.github.owner_name -%}
|
20
|
+
{%- assign branch = site.github.source.branch -%}
|
21
|
+
{%- assign commit = site.github.build_revision | slice: 0, 7 -%}
|
22
|
+
{%- assign repository_url = site.github.repository_url -%}
|
23
|
+
{%- assign issues_url = site.github.issues_url -%}
|
24
|
+
{%- assign zip_url = site.github.zip_url -%}
|
25
|
+
{%- capture github_edit_link %}{% github_edit_link %}{% endcapture -%}
|
26
|
+
{%- endif -%}
|
27
|
+
|
28
|
+
{% comment %} scss and script {% endcomment %}
|
29
|
+
{%- capture site_scss -%}
|
30
|
+
@import "site.scss";
|
31
|
+
{%- if site.fluid %}
|
32
|
+
@import "fluid.scss";
|
33
|
+
{% endif -%}
|
34
|
+
{% include assets/custom.scss %} {{ site.scss }}
|
35
|
+
{%- endcapture -%}
|
36
|
+
|
37
|
+
{%- capture site_script %}
|
38
|
+
{% include assets/site.js %}
|
39
|
+
{% include assets/custom.js %} {{ site.script }}
|
40
|
+
{%- endcapture -%}
|
41
|
+
|
42
|
+
{%- if site.debug -%}
|
43
|
+
{%- assign cdn = site.baseurl -%}
|
44
|
+
{%- else -%}
|
45
|
+
{%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
|
46
|
+
{%- endif -%}
|
47
|
+
|
48
|
+
{% comment %} title {% endcomment %}
|
49
|
+
{%- case page.url -%}
|
50
|
+
{%- when "/" -%}
|
51
|
+
{%- assign title = site.title | append: " · " | append: site.description -%}
|
52
|
+
{%- when "/search.html" -%}
|
53
|
+
{%- assign title = __search | append: " · " | append: site.title -%}
|
54
|
+
{%- when "/404.html" -%}
|
55
|
+
{%- assign title = __404 | append: " · " | append: site.title -%}
|
56
|
+
{%- else -%}
|
57
|
+
{%- assign title = page.title | default: page.url | append: " · " | append: site.title -%}
|
58
|
+
{%- endcase -%}
|
59
|
+
|
60
|
+
{% comment %} content {% endcomment %}
|
61
|
+
{%- assign content = content
|
62
|
+
| replace: '’', "'"
|
63
|
+
| replace: '<pre class="highlight"><code>', "<pre>"
|
64
|
+
| replace: '<pre><code class=', "<pre class="
|
65
|
+
| replace: "</code></pre>", "</pre>"
|
66
|
+
| replace: '<code class="language-plaintext highlighter-rouge">', '<code class="literal">'
|
67
|
+
| replace: "<table>", '<table class="docutils align-default">' -%}
|
68
|
+
|
69
|
+
{% comment %} prev and next {% endcomment %}
|
70
|
+
{%- assign workdir_files = site_files | where_exp: "item", "item.dir == page.dir" -%}
|
71
|
+
|
72
|
+
{%- assign _index = 0 -%}
|
73
|
+
{%- for item in workdir_files %}
|
74
|
+
{%- if item.url == page.url %}
|
75
|
+
{%- assign _index = forloop.index -%}
|
76
|
+
{%- endif %}
|
77
|
+
{%- endfor -%}
|
78
|
+
|
79
|
+
{%- for item in workdir_files -%}
|
80
|
+
{%- assign _index_prev = _index | minus: 1 -%}
|
81
|
+
{%- assign _index_next = _index | plus: 1 -%}
|
82
|
+
{%- if forloop.index == _index_prev -%}
|
83
|
+
{%- assign prev = item -%}
|
84
|
+
{%- endif %}
|
85
|
+
{%- if forloop.index == _index_next and page.url != page.dir -%}
|
86
|
+
{%- assign next = item -%}
|
87
|
+
{%- endif %}
|
88
|
+
{%- endfor -%}
|