jekyll-rtd-theme 0.1.7 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/_includes/addons.liquid +11 -3
- data/_includes/addons/analytics/google.liquid +15 -1
- data/_includes/addons/comments/disqus.liquid +1 -1
- data/_includes/addons/seo/og.liquid +1 -1
- data/_includes/addons/seo/schema.liquid +1 -1
- data/_includes/addons/source/analytics.liquid +1 -3
- data/_includes/addons/source/i18n.liquid +13 -0
- data/_includes/addons/source/{gems.liquid → plugins.liquid} +1 -1
- data/_includes/album.liquid +7 -0
- data/_includes/assets/common.js +40 -0
- data/_includes/assets/custom.js +0 -0
- data/_includes/assets/custom.scss +0 -0
- data/_includes/assets/search.js +80 -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 +9 -5
- data/_includes/i18n/fr.liquid +29 -0
- data/_includes/i18n/it.liquid +29 -0
- data/_includes/i18n/ja.liquid +29 -0
- data/_includes/i18n/ko.liquid +29 -0
- data/_includes/i18n/{zh.liquid → zh-cn.liquid} +9 -5
- data/_includes/list.liquid +4 -4
- data/_includes/reset/defaults.liquid +88 -0
- data/_includes/reset/i18n.liquid +30 -2
- data/_includes/reset/languages.liquid +110 -0
- data/_includes/reset/schema.liquid +6 -0
- data/_includes/reset/site_pages.liquid +8 -0
- data/_includes/reset/workdir.liquid +33 -0
- data/_includes/toctree.liquid +3 -3
- data/_layouts/default.liquid +32 -12
- data/_sass/_album.scss +25 -0
- data/_sass/_embed.scss +23 -0
- data/_sass/fluid.scss +1 -1
- data/_sass/{style.scss → site.scss} +27 -9
- 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/favicon.svg +1 -1
- data/assets/pages.json +6 -0
- data/assets/search.liquid +28 -0
- data/assets/sitemap.xml +4 -4
- metadata +48 -45
- 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/_includes/searchbox.liquid +0 -7
- 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
@@ -0,0 +1,29 @@
|
|
1
|
+
{% comment %} Italian {% endcomment %}
|
2
|
+
{%- assign __github = "Github" -%}
|
3
|
+
{%- assign __homepage = "Homepage" -%}
|
4
|
+
{%- assign __issues = "Problemi" -%}
|
5
|
+
{%- assign __download = "Scarica" -%}
|
6
|
+
{%- assign __plugins = "Plugin del tema" -%}
|
7
|
+
{%- assign __translations = "Traduzioni" -%}
|
8
|
+
{%- assign __statistics = "statistica" -%}
|
9
|
+
{%- assign __total_visits = "Visite totali:" -%}
|
10
|
+
|
11
|
+
{%- assign __note = "Osservazioni" -%}
|
12
|
+
{%- assign __tip = "Suggerimenti" -%}
|
13
|
+
{%- assign __warning = "avvertimento" -%}
|
14
|
+
{%- assign __danger = "Pericolo" -%}
|
15
|
+
|
16
|
+
{%- assign __next = "Pagina successiva" -%}
|
17
|
+
{%- assign __previous = "Pagina precedente" -%}
|
18
|
+
{%- assign __copyright = "Diritto d'autore" -%}
|
19
|
+
{%- assign __revision = "Revisione" -%}
|
20
|
+
|
21
|
+
{%- assign __404 = "404" -%}
|
22
|
+
{%- assign __not_found = "Questa pagina non esiste ancora!" -%}
|
23
|
+
|
24
|
+
{%- assign __searching = "ricerca" -%}
|
25
|
+
{%- assign __search = "Ricerca" -%}
|
26
|
+
{%- assign __search_docs = "Cerca documenti" -%}
|
27
|
+
{%- assign __search_results = "risultati di ricerca" -%}
|
28
|
+
{%- assign __search_results_found = "Ricerca terminata, sono state trovate pagine # corrispondenti alla query di ricerca." -%}
|
29
|
+
{%- assign __search_results_not_found = "La tua ricerca non ha prodotto risultati in nessun documento, assicurati che tutti i caratteri siano scritti correttamente!" -%}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{% comment %} Japanese {% endcomment %}
|
2
|
+
{%- assign __github = "Github" -%}
|
3
|
+
{%- assign __homepage = "ホームページ" -%}
|
4
|
+
{%- assign __issues = "問題" -%}
|
5
|
+
{%- assign __download = "ダウンロード" -%}
|
6
|
+
{%- assign __plugins = "テーマプラグイン" -%}
|
7
|
+
{%- assign __translations = "翻訳" -%}
|
8
|
+
{%- assign __statistics = "統計学" -%}
|
9
|
+
{%- assign __total_visits = "総訪問数:" -%}
|
10
|
+
|
11
|
+
{%- assign __note = "備考" -%}
|
12
|
+
{%- assign __tip = "チップ" -%}
|
13
|
+
{%- assign __warning = "警告" -%}
|
14
|
+
{%- assign __danger = "危険" -%}
|
15
|
+
|
16
|
+
{%- assign __next = "次のページ" -%}
|
17
|
+
{%- assign __previous = "前のページ" -%}
|
18
|
+
{%- assign __copyright = "著作権" -%}
|
19
|
+
{%- assign __revision = "リビジョン" -%}
|
20
|
+
|
21
|
+
{%- assign __404 = "404" -%}
|
22
|
+
{%- assign __not_found = "このページはまだ存在しません!" -%}
|
23
|
+
|
24
|
+
{%- assign __searching = "探す" -%}
|
25
|
+
{%- assign __search = "探す" -%}
|
26
|
+
{%- assign __search_docs = "ドキュメントを検索" -%}
|
27
|
+
{%- assign __search_results = "の検索結果" -%}
|
28
|
+
{%- assign __search_results_found = "検索が終了し、検索クエリに一致する「#」ページが見つかりました。" -%}
|
29
|
+
{%- assign __search_results_not_found = "検索はどのドキュメントにも一致しませんでした。すべての文字のスペルが正しいことを確認してください!" -%}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{% comment %} Korean {% endcomment %}
|
2
|
+
{%- assign __github = "Github" -%}
|
3
|
+
{%- assign __homepage = "홈페이지" -%}
|
4
|
+
{%- assign __issues = "이슈" -%}
|
5
|
+
{%- assign __download = "다운로드" -%}
|
6
|
+
{%- assign __plugins = "테마 플러그인" -%}
|
7
|
+
{%- assign __translations = "번역" -%}
|
8
|
+
{%- assign __statistics = "통계" -%}
|
9
|
+
{%- assign __total_visits = "총 방문수 :" -%}
|
10
|
+
|
11
|
+
{%- assign __note = "비고" -%}
|
12
|
+
{%- assign __tip = "팁" -%}
|
13
|
+
{%- assign __warning = "경고" -%}
|
14
|
+
{%- assign __danger = "위험" -%}
|
15
|
+
|
16
|
+
{%- assign __next = "다음 페이지" -%}
|
17
|
+
{%- assign __previous = "이전 페이지" -%}
|
18
|
+
{%- assign __copyright = "저작권" -%}
|
19
|
+
{%- assign __revision = "개정" -%}
|
20
|
+
|
21
|
+
{%- assign __404 = "404" -%}
|
22
|
+
{%- assign __not_found = "이 페이지는 아직 존재하지 않습니다!" -%}
|
23
|
+
|
24
|
+
{%- assign __searching = "수색" -%}
|
25
|
+
{%- assign __search = "검색" -%}
|
26
|
+
{%- assign __search_docs = "문서 검색" -%}
|
27
|
+
{%- assign __search_results = "검색 결과" -%}
|
28
|
+
{%- assign __search_results_found = "검색이 완료되었습니다. 검색어와 일치하는 # 페이지를 찾았습니다." -%}
|
29
|
+
{%- assign __search_results_not_found = "검색어와 일치하는 문서가 없습니다. 모든 문자의 철자가 올바른지 확인하십시오!" -%}
|
@@ -1,8 +1,10 @@
|
|
1
|
+
{% comment %} Chinese Simplified {% endcomment %}
|
1
2
|
{%- assign __github = "开源文档" -%}
|
2
3
|
{%- assign __homepage = "仓库" -%}
|
3
4
|
{%- assign __issues = "反馈" -%}
|
4
5
|
{%- assign __download = "下载" -%}
|
5
|
-
{%- assign
|
6
|
+
{%- assign __plugins = "主题插件" -%}
|
7
|
+
{%- assign __translations = "文档翻译" -%}
|
6
8
|
{%- assign __statistics = "访问统计" -%}
|
7
9
|
{%- assign __total_visits = "累计浏览次数:" -%}
|
8
10
|
|
@@ -13,13 +15,15 @@
|
|
13
15
|
|
14
16
|
{%- assign __next = "下一篇" -%}
|
15
17
|
{%- assign __previous = "上一篇" -%}
|
16
|
-
{%- assign __edit = "" -%}
|
17
18
|
{%- assign __copyright = "版权所有" -%}
|
18
19
|
{%- assign __revision = "修订版本" -%}
|
19
20
|
|
21
|
+
{%- assign __404 = "404" -%}
|
22
|
+
{%- assign __not_found = "此页面尚不存在!" -%}
|
23
|
+
|
24
|
+
{%- assign __searching = "正在搜索" -%}
|
20
25
|
{%- assign __search = "搜索" -%}
|
21
26
|
{%- assign __search_docs = "搜索文档" -%}
|
22
27
|
{%- assign __search_results = "搜索结果" -%}
|
23
|
-
|
24
|
-
{%- assign
|
25
|
-
{%- assign __no_results_found = "查询结果为空!" -%}
|
28
|
+
{%- assign __search_results_found = "搜索完成, 找到与搜索查询匹配的#个页面" -%}
|
29
|
+
{%- 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.2" -%}
|
3
|
+
{%- assign addons = "github, i18n, plugins, 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/common.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 -%}
|
data/_includes/reset/i18n.liquid
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
-
{%-
|
1
|
+
{%- include reset/languages.liquid -%}
|
2
2
|
|
3
|
-
{
|
3
|
+
{% comment %} Set default lang {% endcomment %}
|
4
|
+
{%- assign site_lang = "en" -%}
|
5
|
+
{%- if languages contains site.lang -%}
|
6
|
+
{%- assign site_lang = site.lang -%}
|
7
|
+
{%- endif -%}
|
8
|
+
|
9
|
+
{% comment %} Get docs all avaiable langs {% endcomment %}
|
10
|
+
{%- capture langs -%}
|
11
|
+
{{ site_lang }}|
|
12
|
+
{%- for item in site_dirs -%}
|
13
|
+
{%- assign chapter = item.dir | remove_first: "/" | split: "/" | first -%}
|
14
|
+
{%- if languages contains chapter -%}
|
15
|
+
{{ chapter }}|
|
16
|
+
{%- endif -%}
|
17
|
+
{%- endfor -%}
|
18
|
+
{%- endcapture -%}
|
19
|
+
{%- assign site_langs = langs | split: "|" | uniq -%}
|
20
|
+
|
21
|
+
{% comment %} include language by the root subdirectory {% endcomment %}
|
22
|
+
{%- assign lang = site_lang -%}
|
23
|
+
|
24
|
+
{%- if page.dir != "/" -%}
|
25
|
+
{%- assign chapter = page.dir | remove_first: "/" | split: "/" | first -%}
|
26
|
+
{%- if languages contains chapter -%}
|
27
|
+
{%- assign lang = chapter -%}
|
28
|
+
{%- endif -%}
|
29
|
+
{%- endif -%}
|
30
|
+
|
31
|
+
{%- include i18n/{{ lang }}.liquid -%}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
{% comment %} https://cloud.google.com/translate/docs/languages ISO-639-1 {% endcomment %}
|
2
|
+
{% comment %} https://github.com/matheuss/google-translate-api/blob/master/languages.js {% endcomment %}
|
3
|
+
{%- capture iso_codes -%}
|
4
|
+
af
|
5
|
+
sq
|
6
|
+
am
|
7
|
+
ar
|
8
|
+
hy
|
9
|
+
az
|
10
|
+
eu
|
11
|
+
be
|
12
|
+
bn
|
13
|
+
bs
|
14
|
+
bg
|
15
|
+
ca
|
16
|
+
ceb
|
17
|
+
ny
|
18
|
+
zh-cn
|
19
|
+
zh-tw
|
20
|
+
co
|
21
|
+
hr
|
22
|
+
cs
|
23
|
+
da
|
24
|
+
nl
|
25
|
+
en
|
26
|
+
eo
|
27
|
+
et
|
28
|
+
tl
|
29
|
+
fi
|
30
|
+
fr
|
31
|
+
fy
|
32
|
+
gl
|
33
|
+
ka
|
34
|
+
de
|
35
|
+
el
|
36
|
+
gu
|
37
|
+
ht
|
38
|
+
ha
|
39
|
+
haw
|
40
|
+
iw
|
41
|
+
hi
|
42
|
+
hmn
|
43
|
+
hu
|
44
|
+
is
|
45
|
+
ig
|
46
|
+
id
|
47
|
+
ga
|
48
|
+
it
|
49
|
+
ja
|
50
|
+
jw
|
51
|
+
kn
|
52
|
+
kk
|
53
|
+
km
|
54
|
+
ko
|
55
|
+
ku
|
56
|
+
ky
|
57
|
+
lo
|
58
|
+
la
|
59
|
+
lv
|
60
|
+
lt
|
61
|
+
lb
|
62
|
+
mk
|
63
|
+
mg
|
64
|
+
ms
|
65
|
+
ml
|
66
|
+
mt
|
67
|
+
mi
|
68
|
+
mr
|
69
|
+
mn
|
70
|
+
my
|
71
|
+
ne
|
72
|
+
no
|
73
|
+
ps
|
74
|
+
fa
|
75
|
+
pl
|
76
|
+
pt
|
77
|
+
ma
|
78
|
+
ro
|
79
|
+
ru
|
80
|
+
sm
|
81
|
+
gd
|
82
|
+
sr
|
83
|
+
st
|
84
|
+
sn
|
85
|
+
sd
|
86
|
+
si
|
87
|
+
sk
|
88
|
+
sl
|
89
|
+
so
|
90
|
+
es
|
91
|
+
su
|
92
|
+
sw
|
93
|
+
sv
|
94
|
+
tg
|
95
|
+
ta
|
96
|
+
te
|
97
|
+
th
|
98
|
+
tr
|
99
|
+
uk
|
100
|
+
ur
|
101
|
+
uz
|
102
|
+
vi
|
103
|
+
cy
|
104
|
+
xh
|
105
|
+
yi
|
106
|
+
yo
|
107
|
+
zu
|
108
|
+
{%- endcapture -%}
|
109
|
+
|
110
|
+
{%- assign languages = iso_codes | split: " " -%}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
{%- assign schema_url = page.url | absolute_url | xml_escape -%}
|
2
|
+
{%- assign schema_lastmod = page.date | default: site.time | date_to_xmlschema -%}
|
3
|
+
|
4
|
+
{%- assign schema_weight_title = page.title | size | divided_by: 200.0 -%}
|
5
|
+
{%- assign schema_weight_content = page.content | size | divided_by: 1024.0 -%}
|
6
|
+
{%- assign schema_priority = schema_weight_content | plus: schema_weight_title | times: 10 | ceil | divided_by: 10.0 | at_least: 0.1 | at_most: 1.0 -%}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{%- assign site_pages = site.html_pages
|
2
|
+
| sort: "path"
|
3
|
+
| sort: "sort"
|
4
|
+
| where_exp: "item", "item.url != '/404.html'"
|
5
|
+
| where_exp: "item", "item.url != '/search.html'" -%}
|
6
|
+
|
7
|
+
{%- assign site_dirs = site_pages | where_exp: "item", "item.dir == item.url" -%}
|
8
|
+
{%- assign site_files = site_pages | where_exp: "item", "item.dir != item.url" -%}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
{% comment %} Start from the language chapter(eg: en-us) or root(/) {% endcomment %}
|
2
|
+
{%- assign workdir = include.workdir | default: "/" -%}
|
3
|
+
|
4
|
+
{%- if page.dir != "/" -%}
|
5
|
+
{%- assign chapter = page.dir | remove_first: "/" | split: "/" | first -%}
|
6
|
+
{%- if languages contains chapter -%}
|
7
|
+
{%- capture workdir %}/{{ chapter }}/{% endcapture -%}
|
8
|
+
{%- endif -%}
|
9
|
+
{%- endif -%}
|
10
|
+
|
11
|
+
{%- assign workdir_level = workdir | append: "temp/" | split: "/" | size | minus: 1 -%}
|
12
|
+
{%- assign workdir_files = site_files | where_exp: "item", "item.dir == workdir" -%}
|
13
|
+
|
14
|
+
{%- capture items -%}
|
15
|
+
{%- for item in site_dirs -%}
|
16
|
+
{%- assign current_m1 = item.dir | append: "temp/" | split: "/" | size | minus: 2 -%}
|
17
|
+
{%- if workdir_level == current_m1 -%}
|
18
|
+
{%- assign temp = workdir | append: "@@" -%}
|
19
|
+
{%- assign dir = item.dir | replace: workdir, temp | split: "@@" | first -%}
|
20
|
+
{% comment %} In the current subdirectory {% endcomment %}
|
21
|
+
{%- if workdir == dir -%}
|
22
|
+
{% comment %} Root directory does not display other languages {% endcomment %}
|
23
|
+
{%- if workdir == "/" -%}
|
24
|
+
{%- assign language = item.dir | replace: "/", "" -%}
|
25
|
+
{%- unless languages contains language %}{{ item.dir }}|{% endunless -%}
|
26
|
+
{%- else -%}
|
27
|
+
{{ item.dir }}|
|
28
|
+
{%- endif -%}
|
29
|
+
{%- endif -%}
|
30
|
+
{%- endif -%}
|
31
|
+
{%- endfor -%}
|
32
|
+
{%- endcapture -%}
|
33
|
+
{%- assign workdir_dirs = items | split: "|" -%}
|
data/_includes/toctree.liquid
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
{%- include reset/
|
1
|
+
{%- include reset/workdir.liquid %}
|
2
2
|
|
3
3
|
<ul>
|
4
|
-
{%- for item in
|
4
|
+
{%- for item in workdir_files -%}
|
5
5
|
{%- assign level = item.dir | append: "temp/" | split: "/" | size | minus: 1 -%}
|
6
6
|
{%- capture current -%}
|
7
7
|
{%- if page.url == item.url %}current{% endif -%}
|
@@ -14,4 +14,4 @@
|
|
14
14
|
{%- endfor %}
|
15
15
|
</ul>
|
16
16
|
|
17
|
-
{%- for
|
17
|
+
{%- for workdir in workdir_dirs %}{% include extend/toctree.liquid %}{% endfor -%}
|
data/_layouts/default.liquid
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
layout: plugins/compress
|
3
3
|
---
|
4
4
|
|
5
|
-
{%- include reset/
|
5
|
+
{%- include reset/defaults.liquid -%}
|
6
6
|
|
7
7
|
<!DOCTYPE html>
|
8
8
|
|
9
9
|
<!--
|
10
10
|
{% if site.remote_theme -%}
|
11
|
-
remote_theme: {{ site.remote_theme }}, based on v{{ version }}
|
11
|
+
rundocs.io, remote_theme: {{ site.remote_theme }}, based on v{{ version }}
|
12
12
|
{%- else -%}
|
13
|
-
theme: {{ site.theme | default: "jekyll-rtd-theme, based on" }} v{{ version }}
|
13
|
+
rundocs.io, theme: {{ site.theme | default: "jekyll-rtd-theme, based on" }} v{{ version }}
|
14
14
|
{%- endif %}
|
15
15
|
-->
|
16
16
|
|
@@ -43,14 +43,25 @@ layout: plugins/compress
|
|
43
43
|
<link rel="canonical" href="{{ schema_url }}">
|
44
44
|
<!-- theme -->
|
45
45
|
<link rel="stylesheet" href="{{ cdn }}/assets/css/theme.css">
|
46
|
-
<
|
46
|
+
<link rel="stylesheet" href="{{ cdn }}/assets/css/rougify/{{ site.rougify | default: 'github' }}.css">
|
47
|
+
<style>{{ site_scss | scssify }}</style>
|
47
48
|
<!-- icon -->
|
48
49
|
<link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/favicon.svg">
|
49
50
|
<!-- script -->
|
50
51
|
<script src="{{ cdn }}/assets/js/jquery.min.js"></script>
|
51
|
-
<script
|
52
|
-
|
53
|
-
|
52
|
+
<script>
|
53
|
+
const ui = {
|
54
|
+
baseurl: "{{ site.baseurl }}",
|
55
|
+
title: "{{ site.title }}",
|
56
|
+
lang: "{{ lang }}",
|
57
|
+
admonition: {
|
58
|
+
note: "{{ __note }}",
|
59
|
+
tip: "{{ __tip }}",
|
60
|
+
warning: "{{ __warning }}",
|
61
|
+
danger: "{{ __danger }}"
|
62
|
+
}
|
63
|
+
};
|
64
|
+
</script>
|
54
65
|
</head>
|
55
66
|
|
56
67
|
<body class="wy-body-for-nav">
|
@@ -60,13 +71,18 @@ layout: plugins/compress
|
|
60
71
|
<div class="wy-side-scroll">
|
61
72
|
<div class="wy-side-nav-search">
|
62
73
|
{% if site.logo %}
|
63
|
-
<a href="{{ site.baseurl }}/">
|
74
|
+
<a href="{{ site.baseurl }}/{% if site_lang != lang %}{{ lang }}/{% endif %}">
|
64
75
|
<img src="{{ site.baseurl }}/{{ site.logo }}" class="logo" alt="{{ site.title }}">
|
65
76
|
</a>
|
66
77
|
{% else %}
|
67
|
-
<a href="{{ site.baseurl }}/" class="icon icon-home"> {{ site.title }}</a>
|
78
|
+
<a href="{{ site.baseurl }}/{% if site_lang != lang %}{{ lang }}/{% endif %}" class="icon icon-home"> {{ site.title }}</a>
|
68
79
|
{% endif %}
|
69
|
-
|
80
|
+
<div role="search">
|
81
|
+
<form id="rtd-search-form" class="wy-form" action="{{ site.baseurl }}/search.html" method="get" autocomplete="off">
|
82
|
+
<input type="text" name="q" placeholder="{{ __search_docs }}...">
|
83
|
+
<input type="hidden" name="lang" value="{{ lang }}">
|
84
|
+
</form>
|
85
|
+
</div>
|
70
86
|
</div>
|
71
87
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
72
88
|
{% include toctree.liquid %}
|
@@ -82,7 +98,7 @@ layout: plugins/compress
|
|
82
98
|
<!-- MOBILE NAV -->
|
83
99
|
<nav class="wy-nav-top" aria-label="top navigation">
|
84
100
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
85
|
-
<a href="{{ site.baseurl }}/">{{ site.title }}</a>
|
101
|
+
<a href="{{ site.baseurl }}/{% if site_lang != lang %}{{ lang }}/{% endif %}">{{ site.title }}</a>
|
86
102
|
</nav>
|
87
103
|
<div class="wy-nav-content">
|
88
104
|
<div class="rst-content">
|
@@ -93,7 +109,7 @@ layout: plugins/compress
|
|
93
109
|
{{ content }}
|
94
110
|
{%- else -%}
|
95
111
|
<div class="section">{{ content }}</div>
|
96
|
-
{%- endif
|
112
|
+
{%- endif -%}
|
97
113
|
</div>
|
98
114
|
{% include addons/comments/disqus.liquid %}
|
99
115
|
</div>
|
@@ -103,6 +119,10 @@ layout: plugins/compress
|
|
103
119
|
</section>
|
104
120
|
</div>
|
105
121
|
{%- if site.addons %}{% include addons.liquid %}{% endif %}
|
122
|
+
<!-- script -->
|
123
|
+
<script src="{{ cdn }}/assets/js/theme.js"></script>
|
124
|
+
<script src="{{ cdn }}/assets/js/anchor.min.js"></script>
|
125
|
+
<script>{{ site_script }}</script>
|
106
126
|
<!-- analytics -->
|
107
127
|
{%- include addons/analytics/baidu.liquid -%}
|
108
128
|
{%- include addons/analytics/cnzz.liquid -%}
|