jekyll-rtd-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +43 -0
- data/_includes/addons/analytics/baidu.liquid +18 -0
- data/_includes/addons/analytics/cnzz.liquid +4 -0
- data/_includes/addons/analytics/google.liquid +18 -0
- data/_includes/addons/seo/og.liquid +7 -0
- data/_includes/addons/seo/schema.liquid +10 -0
- data/_includes/addons/source/analytics.liquid +16 -0
- data/_includes/addons/source/gems.liquid +6 -0
- data/_includes/addons/source/github.liquid +12 -0
- data/_includes/assets/404.liquid +5 -0
- data/_includes/assets/data.liquid +12 -0
- data/_includes/assets/js/script.js +64 -0
- data/_includes/assets/search.liquid +5 -0
- data/_includes/breadcrumbs.liquid +33 -0
- data/_includes/footer.liquid +27 -0
- data/_includes/i18n/en.liquid +25 -0
- data/_includes/i18n/zh.liquid +25 -0
- data/_includes/reset/content.liquid +7 -0
- data/_includes/reset/html.liquid +8 -0
- data/_includes/reset/i18n.liquid +3 -0
- data/_includes/reset/navigation.liquid +19 -0
- data/_includes/reset/snippets.liquid +3 -0
- data/_includes/reset/start.liquid +7 -0
- data/_includes/reset/title.liquid +10 -0
- data/_includes/reset/variables.liquid +8 -0
- data/_includes/searchbox.liquid +7 -0
- data/_includes/sidebar.liquid +52 -0
- data/_includes/versions.liquid +22 -0
- data/_layouts/default.liquid +102 -0
- data/_layouts/plugins/compress.liquid +14 -0
- data/_sass/embed.scss +25 -0
- data/_sass/fluid.scss +7 -0
- data/_sass/style.scss +59 -0
- data/assets/404.md +5 -0
- data/assets/css/style.scss +2 -0
- data/assets/data.json +6 -0
- data/assets/favicon.png +0 -0
- data/assets/robots.txt +9 -0
- data/assets/search.md +5 -0
- data/assets/sitemap.xml +18 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5ec9e0b342599501734319987d2e9e126b1ec68f9fda65b68f3e8db033af4057
|
4
|
+
data.tar.gz: f5f5cc84de3b2676732e3cd9df4b85bdd61ec6a44814a6b9d9e1e4abb990c035
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 492da44c0119656b6c917da857df833b41d519a2c3a74505cdf2cb2aa702ccfdb2a015e7b7627aab4362297513033a54fca19c3fe0ee0a108397b97bb21b92a8
|
7
|
+
data.tar.gz: 7a42ad86878239b5afe11a02d747c2ab28c484f66064d69266559adc400b2179ae4eaf5e6c95befa7d0b860648e114add25a79d06c2940c937192e0fb29383a2
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2020 RunDocs
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# jekyll-rtd-theme
|
2
|
+
![Gem Version](https://badge.fury.io/rb/jekyll-rtd-theme.svg)
|
3
|
+
![Gem Downloads](https://img.shields.io/gem/dt/jekyll-rtd-theme)
|
4
|
+
![Users](https://img.shields.io/endpoint?url=https://rundocs-analytics.glitch.me/shields)
|
5
|
+
|
6
|
+
Just another Jekyll theme for GitHub Pages based on ReadtheDocs's sphinx_rtd_theme styles
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
There are two ways to install: as a gem-based theme, as a remote theme (GitHub Pages compatible)
|
10
|
+
|
11
|
+
#### Gem-based method
|
12
|
+
1. Add the following to your github repository's `Gemfile`
|
13
|
+
```ruby
|
14
|
+
source "https://rubygems.org"
|
15
|
+
gem "jekyll-rtd-theme"
|
16
|
+
gem "github-pages", group: :jekyll_plugins
|
17
|
+
```
|
18
|
+
2. Add the following to your github repository's `_config.yml`
|
19
|
+
```yml
|
20
|
+
theme: jekyll-rtd-theme
|
21
|
+
```
|
22
|
+
|
23
|
+
#### Remote theme method
|
24
|
+
1. Add the following to your site's `_config.yml`
|
25
|
+
```yml
|
26
|
+
remote_theme: rundocs/jekyll-rtd-theme
|
27
|
+
```
|
28
|
+
2. Remove any other `theme` or `remote_theme` entry
|
29
|
+
|
30
|
+
|
31
|
+
## Roadmap
|
32
|
+
See the [open issues][issues] for a list of proposed features (and known issues).
|
33
|
+
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
1. Clone down the theme's repository (`git clone https://github.com/rundocs/jekyll-rtd-theme.git`)
|
37
|
+
2. `cd` into the theme's directory
|
38
|
+
3. Run `bundle` to install the necessary dependencies
|
39
|
+
4. Run `bundle exec jekyll server` to start the preview server
|
40
|
+
5. Visit [`http://localhost:4000`](http://localhost:4000) in your browser to preview the theme
|
41
|
+
|
42
|
+
|
43
|
+
[issues]: https://github.com/rundocs/jekyll-rtd-theme/issues
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{%- if site.baidu.linksubmit -%}
|
2
|
+
<script>
|
3
|
+
(function(script) {
|
4
|
+
script.src = "https://zz.bdstatic.com/linksubmit/push.js";
|
5
|
+
document.head.appendChild(script);
|
6
|
+
})(document.createElement("script"));
|
7
|
+
</script>
|
8
|
+
{%- endif -%}
|
9
|
+
|
10
|
+
{%- if site.baidu.hm -%}
|
11
|
+
<script>
|
12
|
+
var _hmt = _hmt || [];
|
13
|
+
(function(script) {
|
14
|
+
script.src = "https://hm.baidu.com/hm.js?{{ site.baidu.hm }}";
|
15
|
+
document.head.appendChild(script);
|
16
|
+
})(document.createElement("script"));
|
17
|
+
</script>
|
18
|
+
{%- endif -%}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{%- if site.google.gtag -%}
|
2
|
+
<!-- Google Analytics -->
|
3
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google.gtag }}"></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", "{{ site.google.gtag }}");
|
12
|
+
</script>
|
13
|
+
{%- endif -%}
|
14
|
+
|
15
|
+
{%- if site.google.adsense -%}
|
16
|
+
<!-- Google AdSense -->
|
17
|
+
<script data-ad-client="{{ site.google.adsense }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
18
|
+
{%- endif -%}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<meta property="og:title" content="{{ title }}">
|
2
|
+
<meta property="og:description" content="{{ description }}">
|
3
|
+
<meta property="og:locale" content="{{ lang }}">
|
4
|
+
<meta property="og:url" content="{{ schema_url }}">
|
5
|
+
<meta property="og:type" content="article">
|
6
|
+
<meta property="article:author" content="{{ author }}">
|
7
|
+
<meta property="article:modified_time" content="{{ schema_lastmod }}">
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<dl>
|
2
|
+
<dt>{{ __statistics }}</dt>
|
3
|
+
<dd>
|
4
|
+
<a href="https://github.com/rundocs/analytics" target="_blank">
|
5
|
+
{{ __total_visits }} <span id="counter"></span> <i class="fa fa-eye"></i>
|
6
|
+
</a>
|
7
|
+
</dd>
|
8
|
+
</dl>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
$(document).ready(function() {
|
12
|
+
$.getJSON("https://rundocs-analytics.glitch.me/analytics?host=" + location.host, function(data) {
|
13
|
+
$("#counter").html(data.count);
|
14
|
+
});
|
15
|
+
});
|
16
|
+
</script>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<dl>
|
2
|
+
<dt>{{ __github }}</dt>
|
3
|
+
{%- if jekyll.environment == "production" -%}
|
4
|
+
<dd><a href="{{ site.github.repository_url }}"><i class="fa fa-github"></i> {{ __homepage }}</a></dd>
|
5
|
+
<dd><a href="{{ site.github.zip_url }}"><i class="fa fa-download"></i> {{ __download }}</a></dd>
|
6
|
+
<dd><a href="{{ site.github.issues_url }}"><i class="fa fa-question-circle-o"></i> {{ __issues }}</a></dd>
|
7
|
+
{%- else -%}
|
8
|
+
<dd><a href="#"><i class="fa fa-github"></i> {{ __homepage }}</a></dd>
|
9
|
+
<dd><a href="#"><i class="fa fa-download"></i> {{ __download }}</a></dd>
|
10
|
+
<dd><a href="#"><i class="fa fa-question-circle-o"></i> {{ __issues }}</a></dd>
|
11
|
+
{%- endif -%}
|
12
|
+
</dl>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{%- include reset/html.liquid -%}
|
2
|
+
|
3
|
+
[
|
4
|
+
{%- for page in html_pages -%}
|
5
|
+
{
|
6
|
+
"title": "{{ page.title }}",
|
7
|
+
"url": "{{ page.url | absolute_url }}",
|
8
|
+
"content": "{{ page.content | strip_newlines | split: ' ' | join: ' ' | xml_escape }}"
|
9
|
+
}
|
10
|
+
{%- if forloop.rindex != 1 %},{% endif -%}
|
11
|
+
{%- endfor -%}
|
12
|
+
]
|
@@ -0,0 +1,64 @@
|
|
1
|
+
function search(data) {
|
2
|
+
let text = new URL(location.href).searchParams.get("q");
|
3
|
+
let results = [];
|
4
|
+
for (item of data) {
|
5
|
+
let [caption, context] = [item.title.match(text), item.content.match(text)];
|
6
|
+
if (caption || context) {
|
7
|
+
let result = [`<a href="${item.url}">${item.title}</a>`];
|
8
|
+
if (context) {
|
9
|
+
let min = context.index - 50;
|
10
|
+
let max = context.index + 50;
|
11
|
+
if (min < 0) {
|
12
|
+
min = 0;
|
13
|
+
}
|
14
|
+
if (max > item.content.length) {
|
15
|
+
max = item.content.length;
|
16
|
+
}
|
17
|
+
result.push(`<p class="context">${item.content.slice(min, max)}</p>`);
|
18
|
+
}
|
19
|
+
results.push(`<li>${result.join("")}</li>`);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
if (results.length > 0 && text.length > 0) {
|
23
|
+
$("#search-results").html(`<ul class="search">${results.join("")}</ul>`);
|
24
|
+
} else {
|
25
|
+
$("#search-results").html("{{ __no_results_found }}");
|
26
|
+
}
|
27
|
+
$("#rtd-search-form [name='q']").val(text);
|
28
|
+
}
|
29
|
+
|
30
|
+
function reset() {
|
31
|
+
const link = $(".wy-menu-vertical").find(`[href="${location.pathname}"]`);
|
32
|
+
if (link.length > 0) {
|
33
|
+
$(".wy-menu-vertical .current").removeClass("current");
|
34
|
+
link.addClass("current");
|
35
|
+
link.closest("li.toctree-l1").parent().addClass("current");
|
36
|
+
link.closest("li.toctree-l1").addClass("current");
|
37
|
+
link.closest("li.toctree-l2").addClass("current");
|
38
|
+
link.closest("li.toctree-l3").addClass("current");
|
39
|
+
link.closest("li.toctree-l4").addClass("current");
|
40
|
+
link.closest("li.toctree-l5").addClass("current");
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function admonition() {
|
45
|
+
const items = {
|
46
|
+
note: "{{ __note }}",
|
47
|
+
tip: "{{ __tip }}",
|
48
|
+
warning: "{{ __warning }}",
|
49
|
+
danger: "{{ __danger }}"
|
50
|
+
};
|
51
|
+
for (let item in items) {
|
52
|
+
let content = $(`.language-${item}`).html();
|
53
|
+
$(`.language-${item}`).replaceWith(`<div class="admonition ${item}"><p class="admonition-title">${items[item]}</p><p>${content}</p></div>`);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
$(document).ready(function() {
|
58
|
+
if (location.pathname == "{{ site.baseurl }}/search.html") {
|
59
|
+
$.getJSON("{{ site.baseurl }}/data.json", search);
|
60
|
+
}
|
61
|
+
admonition();
|
62
|
+
SphinxRtdTheme.Navigation.reset = reset;
|
63
|
+
SphinxRtdTheme.Navigation.enable(true);
|
64
|
+
});
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<div role="navigation" aria-label="breadcrumbs navigation">
|
2
|
+
<ul class="wy-breadcrumbs">
|
3
|
+
<li><a href="{{ site.baseurl }}/" class="icon icon-home"></a>»</li>
|
4
|
+
{% case page.url %}
|
5
|
+
{% when "/search.html" %}
|
6
|
+
<li>{{ __search }}</li>
|
7
|
+
{% when "/404.html" %}
|
8
|
+
<li>{{ __404 }}</li>
|
9
|
+
{% else %}
|
10
|
+
{% assign blocks = page.path | split: "/" %}
|
11
|
+
{% assign length = blocks | size %}
|
12
|
+
{% if page.dir == page.url and page.url != "/" %}
|
13
|
+
{% assign length = blocks | size | minus: 1 %}
|
14
|
+
{% endif %}
|
15
|
+
{% for block in blocks limit: length %}
|
16
|
+
{% if forloop.last %}
|
17
|
+
<li>{{ page.title }}</li>
|
18
|
+
{% else %}
|
19
|
+
{% capture href %}{{ site.baseurl }}/{% for block in blocks limit: forloop.index %}{{ block | append: "/" }}{% endfor %}{% endcapture %}
|
20
|
+
<li><a href="{{ href }}">{{ block | capitalize }}</a> »</li>
|
21
|
+
{% endif %}
|
22
|
+
{% endfor %}
|
23
|
+
{% endcase %}
|
24
|
+
<li class="wy-breadcrumbs-aside">
|
25
|
+
{%- if jekyll.environment == "production" -%}
|
26
|
+
<a href="{% github_edit_link %}" class="fa fa-github" target="_blank"> {{ __edit }}</a>
|
27
|
+
{%- else -%}
|
28
|
+
<a href="#" class="fa fa-github" target="_blank"> {{ __edit }}</a>
|
29
|
+
{%- endif -%}
|
30
|
+
</li>
|
31
|
+
</ul>
|
32
|
+
<hr>
|
33
|
+
</div>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<footer>
|
2
|
+
{%- if next or prev -%}
|
3
|
+
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
4
|
+
{%- if next -%}
|
5
|
+
<a href="{{ site.baseurl | append: next.url }}" class="btn btn-neutral float-right" title="{{ next.title }}" accesskey="n" rel="next">
|
6
|
+
{{- __next }} <span class="fa fa-arrow-circle-right"></span>
|
7
|
+
</a>
|
8
|
+
{%- endif -%}
|
9
|
+
{%- if prev -%}
|
10
|
+
<a href="{{ site.baseurl | append: prev.url }}" class="btn btn-neutral float-left" title="{{ prev.title }}" accesskey="p" rel="prev">
|
11
|
+
<span class="fa fa-arrow-circle-left"></span> {{ __previous -}}
|
12
|
+
</a>
|
13
|
+
{%- endif -%}
|
14
|
+
</div>
|
15
|
+
{%- endif -%}
|
16
|
+
<hr>
|
17
|
+
<div role="contentinfo" class="copyright">
|
18
|
+
<p>
|
19
|
+
<i class="fa fa-copyright"></i> {{ __copyright }}
|
20
|
+
{{ site.time | date: "%Y" }},
|
21
|
+
{{ site.copyright | default: site.github.owner_name }}
|
22
|
+
<span class="commit">
|
23
|
+
{{ __revision }} <code>{{ commit }}</code>
|
24
|
+
</span>
|
25
|
+
</p>
|
26
|
+
</div>
|
27
|
+
</footer>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{%- assign __github = "GitHub" -%}
|
2
|
+
{%- assign __homepage = "Homepage" -%}
|
3
|
+
{%- assign __issues = "Issues" -%}
|
4
|
+
{%- assign __download = "Download" -%}
|
5
|
+
{%- assign __gems = "Gems" -%}
|
6
|
+
{%- assign __statistics = "Statistics" -%}
|
7
|
+
{%- assign __total_visits = "Total visits:" -%}
|
8
|
+
|
9
|
+
{%- assign __note = "Note" -%}
|
10
|
+
{%- assign __tip = "Tip" -%}
|
11
|
+
{%- assign __warning = "Warning" -%}
|
12
|
+
{%- assign __danger = "Danger" -%}
|
13
|
+
|
14
|
+
{%- assign __next = "Next" -%}
|
15
|
+
{%- assign __previous = "Previous" -%}
|
16
|
+
{%- assign __edit = "Edit on GitHub" -%}
|
17
|
+
{%- assign __copyright = "Copyright" -%}
|
18
|
+
{%- assign __revision = "Revision" -%}
|
19
|
+
|
20
|
+
{%- assign __search = "Search" -%}
|
21
|
+
{%- assign __search_docs = "Search Docs" -%}
|
22
|
+
{%- assign __search_results = "Search Results" -%}
|
23
|
+
|
24
|
+
{%- assign __404 = "404" -%}
|
25
|
+
{%- assign __no_results_found = "No results found!" -%}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{%- assign __github = "开源文档" -%}
|
2
|
+
{%- assign __homepage = "仓库" -%}
|
3
|
+
{%- assign __issues = "反馈" -%}
|
4
|
+
{%- assign __download = "下载" -%}
|
5
|
+
{%- assign __gems = "文档插件" -%}
|
6
|
+
{%- assign __statistics = "访问统计" -%}
|
7
|
+
{%- assign __total_visits = "累计浏览次数:" -%}
|
8
|
+
|
9
|
+
{%- assign __note = "备注" -%}
|
10
|
+
{%- assign __tip = "提醒" -%}
|
11
|
+
{%- assign __warning = "重要提醒" -%}
|
12
|
+
{%- assign __danger = "重要提示" -%}
|
13
|
+
|
14
|
+
{%- assign __next = "下一篇" -%}
|
15
|
+
{%- assign __previous = "上一篇" -%}
|
16
|
+
{%- assign __edit = "" -%}
|
17
|
+
{%- assign __copyright = "版权所有" -%}
|
18
|
+
{%- assign __revision = "修订版本" -%}
|
19
|
+
|
20
|
+
{%- assign __search = "搜索" -%}
|
21
|
+
{%- assign __search_docs = "搜索文档" -%}
|
22
|
+
{%- assign __search_results = "搜索结果" -%}
|
23
|
+
|
24
|
+
{%- assign __404 = "404" -%}
|
25
|
+
{%- assign __no_results_found = "查询结果为空!" -%}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{%- assign content = content
|
2
|
+
| replace: '’', "'"
|
3
|
+
| replace: '<pre class="highlight"><code>', "<pre>"
|
4
|
+
| replace: '<pre><code class=', "<pre class="
|
5
|
+
| replace: "</code></pre>", "</pre>"
|
6
|
+
| replace: '<code class="language-plaintext highlighter-rouge">', '<code class="literal">'
|
7
|
+
| replace: "<table>", '<table class="docutils align-default">' -%}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{%- assign html_pages = site.html_pages
|
2
|
+
| sort: "path"
|
3
|
+
| where_exp: "item", "item.url != '/404.html'"
|
4
|
+
| where_exp: "item", "item.url != '/search.html'" -%}
|
5
|
+
{%- assign html_dirs = html_pages
|
6
|
+
| where_exp: "item", "item.dir == item.url" -%}
|
7
|
+
{%- assign html_files = html_pages
|
8
|
+
| where_exp: "item", "item.dir != item.url" -%}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{%- assign workspace_files = html_files | where_exp: "item", "item.dir == page.dir" -%}
|
2
|
+
|
3
|
+
{%- assign index = 0 -%}
|
4
|
+
{%- for item in workspace_files %}
|
5
|
+
{%- if item.url == page.url %}
|
6
|
+
{%- assign index = forloop.index -%}
|
7
|
+
{%- endif %}
|
8
|
+
{%- endfor -%}
|
9
|
+
|
10
|
+
{%- for item in workspace_files -%}
|
11
|
+
{%- assign index_prev = index | minus: 1 -%}
|
12
|
+
{%- assign index_next = index | plus: 1 -%}
|
13
|
+
{%- if forloop.index == index_prev -%}
|
14
|
+
{%- assign prev = item -%}
|
15
|
+
{%- endif %}
|
16
|
+
{%- if forloop.index == index_next and page.url != page.dir -%}
|
17
|
+
{%- assign next = item -%}
|
18
|
+
{%- endif %}
|
19
|
+
{%- endfor -%}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{%- case page.url -%}
|
2
|
+
{%- when "/" -%}
|
3
|
+
{%- assign title = site.title | append: " · " | append: site.description -%}
|
4
|
+
{%- when "/search.html" -%}
|
5
|
+
{%- assign title = __search | append: " · " | append: site.title -%}
|
6
|
+
{%- when "/404.html" -%}
|
7
|
+
{%- assign title = __404 | append: " · " | append: site.title -%}
|
8
|
+
{%- else -%}
|
9
|
+
{%- assign title = page.title | append: " · " | append: site.title -%}
|
10
|
+
{%- endcase -%}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
|
2
|
+
{%- assign author = site.github.owner_name -%}
|
3
|
+
{%- assign commit = site.github.build_revision | slice: 0, 7 -%}
|
4
|
+
{%- assign schema_url = page.url | absolute_url | xml_escape -%}
|
5
|
+
{%- assign schema_lastmod = site.time | date_to_xmlschema -%}
|
6
|
+
{%- assign npm = "https://cdn.jsdelivr.net/npm" -%}
|
7
|
+
{%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/static" -%}
|
8
|
+
{%- assign rouge_style = site.rouge_style | default: "github" -%}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<div role="search">
|
2
|
+
<form id="rtd-search-form" class="wy-form" action="{{ site.baseurl }}/search.html" method="get" autocomplete="off">
|
3
|
+
<input type="text" name="q" placeholder="{{ __search_docs }}...">
|
4
|
+
<input type="hidden" name="check_keywords" value="yes">
|
5
|
+
<input type="hidden" name="area" value="default">
|
6
|
+
</form>
|
7
|
+
</div>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
{%- assign workspace = include.workspace | default: "/" -%}
|
2
|
+
{%- assign workspace_level = workspace | append: "temp/" | split: "/" | size | minus: 1 -%}
|
3
|
+
{%- assign workspace_files = html_files | where_exp: "item", "item.dir == workspace" -%}
|
4
|
+
|
5
|
+
{%- capture items -%}
|
6
|
+
{%- for item in html_dirs -%}
|
7
|
+
{%- assign current_m1 = item.dir | append: "temp/" | split: "/" | size | minus: 2 -%}
|
8
|
+
{%- if workspace_level == current_m1 -%}
|
9
|
+
{%- assign temp = workspace | append: "@@" -%}
|
10
|
+
{%- assign dir = item.dir | replace: workspace, temp | split: "@@" | first -%}
|
11
|
+
{%- if workspace == dir -%}
|
12
|
+
{{ item.dir }}|
|
13
|
+
{%- endif -%}
|
14
|
+
{%- endif -%}
|
15
|
+
{%- endfor -%}
|
16
|
+
{%- endcapture -%}
|
17
|
+
{%- assign workspace_dirs = items | split: "|" -%}
|
18
|
+
|
19
|
+
{%- if workspace_level > 1 -%}
|
20
|
+
{%- assign dir = html_pages | where: "url", workspace | first -%}
|
21
|
+
{%- if workspace_level == 2 %}
|
22
|
+
<p class="caption"><span class="caption-text">{{ dir.title | default: dir.url }}</span></p>
|
23
|
+
{%- else %}
|
24
|
+
<a class="reference internal" href="{{ site.baseurl | append: dir.url }}">{{ dir.title | default: dir.url }}</a>
|
25
|
+
{%- endif -%}
|
26
|
+
{%- endif %}
|
27
|
+
|
28
|
+
<ul>
|
29
|
+
{%- for item in workspace_files -%}
|
30
|
+
{%- assign level = item.dir | append: "temp/" | split: "/" | size | minus: 1 -%}
|
31
|
+
{%- capture current %}{% if page.url == item.url %}current{% endif %}{% endcapture -%}
|
32
|
+
{%- if level > 1 -%}
|
33
|
+
{%- assign level = level | minus: 1 -%}
|
34
|
+
{%- endif %}
|
35
|
+
<li class="toctree-l{{ level }} {{ current }}">
|
36
|
+
<a class="reference internal {{ current }}" href="{{ site.baseurl | append: item.url }}">
|
37
|
+
{{ item.title | default: item.url }}
|
38
|
+
</a>
|
39
|
+
</li>
|
40
|
+
{%- endfor -%}
|
41
|
+
{%- for workspace in workspace_dirs -%}
|
42
|
+
{%- assign level = workspace | append: "temp/" | split: "/" | size | minus: 2 -%}
|
43
|
+
{%- assign start = "" -%}
|
44
|
+
{%- assign end = "" -%}
|
45
|
+
{%- if level > 1 -%}
|
46
|
+
{%- assign level = level | minus: 1 -%}
|
47
|
+
{%- capture start %}<li class="toctree-l{{ level }}">{% endcapture -%}
|
48
|
+
{%- capture end %}</li>{% endcapture -%}
|
49
|
+
{%- endif -%}
|
50
|
+
{{ start }}{% include sidebar.liquid %}{{ end }}
|
51
|
+
{%- endfor -%}
|
52
|
+
</ul>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
2
|
+
<span class="rst-current-version" data-toggle="rst-current-version">
|
3
|
+
<span class="fa fa-book"> {{ site.title }}</span>
|
4
|
+
{{ commit }}
|
5
|
+
<span class="fa fa-caret-down"></span>
|
6
|
+
</span>
|
7
|
+
<div class="rst-other-versions">
|
8
|
+
{%- assign addons = "github,gems,analytics" | split: "," -%}
|
9
|
+
{% for name in addons -%}
|
10
|
+
{% include addons/source/{{ name }}.liquid %}
|
11
|
+
{% endfor -%}
|
12
|
+
<hr>
|
13
|
+
<small>
|
14
|
+
<span>
|
15
|
+
Built with
|
16
|
+
<a href="https://jekyllrb.com/">Jekyll</a>
|
17
|
+
using the
|
18
|
+
<a href="https://github.com/rundocs/jekyll-rtd-theme">jekyll-rtd-theme</a> (MIT)
|
19
|
+
</span>
|
20
|
+
</small>
|
21
|
+
</div>
|
22
|
+
</div>
|
@@ -0,0 +1,102 @@
|
|
1
|
+
---
|
2
|
+
layout: plugins/compress
|
3
|
+
---
|
4
|
+
|
5
|
+
{%- include reset/start.liquid -%}
|
6
|
+
|
7
|
+
<!DOCTYPE html>
|
8
|
+
<html class="writer-html5" lang="{{ lang }}">
|
9
|
+
|
10
|
+
<head>
|
11
|
+
<meta charset="utf-8">
|
12
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
13
|
+
<title>{{ title }}</title>
|
14
|
+
<!-- meta -->
|
15
|
+
<meta name="description" content="{{ description }}">
|
16
|
+
<meta name="author" content="{{ author }}">
|
17
|
+
<meta name="revised" content="{{ commit }}">
|
18
|
+
<meta name="generator" content="Jekyll v{{ jekyll.version }}">
|
19
|
+
<!-- custom meta -->
|
20
|
+
{% for meta in site.meta -%}
|
21
|
+
<meta name="{{ meta.first }}" content="{{ meta.last }}">
|
22
|
+
{% endfor -%}
|
23
|
+
<!-- og -->
|
24
|
+
{% include addons/seo/og.liquid %}
|
25
|
+
<!-- schema -->
|
26
|
+
{% include addons/seo/schema.liquid %}
|
27
|
+
<!-- link -->
|
28
|
+
{% if prev -%}
|
29
|
+
<link rel="prev" href="{{ prev.url | absolute_url | xml_escape }}">
|
30
|
+
{%- endif -%}
|
31
|
+
{%- if next -%}
|
32
|
+
<link rel="next" href="{{ next.url | absolute_url | xml_escape }}">
|
33
|
+
{%- endif -%}
|
34
|
+
<link rel="canonical" href="{{ schema_url }}">
|
35
|
+
<!-- theme -->
|
36
|
+
<link rel="stylesheet" href="{{ cdn }}/css/theme.css">
|
37
|
+
<link rel="stylesheet" href="{{ cdn }}/css/rouge/{{ rouge_style }}.css">
|
38
|
+
<style>{{ site.style | default: site_style | scssify }}</style>
|
39
|
+
{%- if site.fluid -%}
|
40
|
+
<style>{{ site_fluid | scssify }}</style>
|
41
|
+
{%- endif %}
|
42
|
+
<!-- icon -->
|
43
|
+
<link rel="icon" href="{{ site.baseurl }}/assets/favicon.png">
|
44
|
+
<!-- script -->
|
45
|
+
<script src="{{ npm }}/jquery/dist/jquery.min.js"></script>
|
46
|
+
<script src="{{ cdn }}/js/theme.js"></script>
|
47
|
+
<script>{{ site.script | default : site_script }}</script>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body class="wy-body-for-nav">
|
51
|
+
<div class="wy-grid-for-nav">
|
52
|
+
<!-- SIDE NAV, TOGGLES ON MOBILE -->
|
53
|
+
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
54
|
+
<div class="wy-side-scroll">
|
55
|
+
<div class="wy-side-nav-search">
|
56
|
+
<a href="{{ site.baseurl }}/" class="icon icon-home">
|
57
|
+
{{ site.title }}
|
58
|
+
</a>
|
59
|
+
{% include searchbox.liquid %}
|
60
|
+
</div>
|
61
|
+
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
62
|
+
{% include sidebar.liquid %}
|
63
|
+
</div>
|
64
|
+
{%- if site.embed -%}
|
65
|
+
<div class="wy-embed-wrap">
|
66
|
+
<div class="wy-embed">{{ site.embed }}</div>
|
67
|
+
</div>
|
68
|
+
{%- endif -%}
|
69
|
+
</div>
|
70
|
+
</nav>
|
71
|
+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
72
|
+
<!-- MOBILE NAV -->
|
73
|
+
<nav class="wy-nav-top" aria-label="top navigation">
|
74
|
+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
75
|
+
<a href="{{ site.baseurl }}/">{{ site.title }}</a>
|
76
|
+
</nav>
|
77
|
+
<div class="wy-nav-content">
|
78
|
+
<div class="rst-content">
|
79
|
+
{% include breadcrumbs.liquid %}
|
80
|
+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
81
|
+
<div itemprop="articleBody">
|
82
|
+
{%- if page.url == "/search.html" -%}
|
83
|
+
{{ content }}
|
84
|
+
{%- else -%}
|
85
|
+
<div class="section">{{ content }}</div>
|
86
|
+
{%- endif %}
|
87
|
+
</div>
|
88
|
+
<div class="articleComments"></div>
|
89
|
+
</div>
|
90
|
+
{% include footer.liquid %}
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
</section>
|
94
|
+
</div>
|
95
|
+
{%- include versions.liquid -%}
|
96
|
+
<!-- analytics -->
|
97
|
+
{%- include addons/analytics/baidu.liquid -%}
|
98
|
+
{%- include addons/analytics/cnzz.liquid -%}
|
99
|
+
{%- include addons/analytics/google.liquid -%}
|
100
|
+
</body>
|
101
|
+
|
102
|
+
</html>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{%- if site.compress == false -%}
|
2
|
+
{{ content }}
|
3
|
+
{%- else -%}
|
4
|
+
{%- assign items = content | split: "<pre" -%}
|
5
|
+
{%- for item in items -%}
|
6
|
+
{%- assign block = item | split: "</pre>" -%}
|
7
|
+
{%- assign block_after = block.last | split: " " | join: " " -%}
|
8
|
+
{%- if block.size == 1 -%}
|
9
|
+
{{ block_after }}
|
10
|
+
{%- else -%}
|
11
|
+
<pre{{ block.first }}</pre>{{ block_after }}
|
12
|
+
{%- endif -%}
|
13
|
+
{%- endfor -%}
|
14
|
+
{%- endif -%}
|
data/_sass/embed.scss
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
.wy-embed-wrap {
|
2
|
+
width: 100%;
|
3
|
+
padding: 1em 1.5em;
|
4
|
+
font-size: 14px;
|
5
|
+
line-height: 20px;
|
6
|
+
}
|
7
|
+
|
8
|
+
.wy-embed {
|
9
|
+
text-align: center;
|
10
|
+
padding: 1em;
|
11
|
+
color: #c2c2c2;
|
12
|
+
background: #4e4b4b;
|
13
|
+
border: 1px solid #a0a0a0;
|
14
|
+
border-radius: 5px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.wy-embed {
|
18
|
+
a {
|
19
|
+
color: #e6e6e6;
|
20
|
+
}
|
21
|
+
|
22
|
+
img {
|
23
|
+
max-width: 100%;
|
24
|
+
}
|
25
|
+
}
|
data/_sass/fluid.scss
ADDED
data/_sass/style.scss
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
@import "embed.scss";
|
2
|
+
|
3
|
+
p {
|
4
|
+
font-size: 15px;
|
5
|
+
}
|
6
|
+
|
7
|
+
footer {
|
8
|
+
p {
|
9
|
+
font-size: 14px;
|
10
|
+
text-align: center;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
.rst-versions {
|
15
|
+
&.shift-up {
|
16
|
+
overflow-y: auto;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
.wy-nav-side {
|
21
|
+
padding-bottom: 3em;
|
22
|
+
}
|
23
|
+
|
24
|
+
.wy-nav-top {
|
25
|
+
a {
|
26
|
+
margin-left: -30px;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
.rst-content {
|
31
|
+
ol,
|
32
|
+
ul {
|
33
|
+
overflow-x: auto;
|
34
|
+
}
|
35
|
+
|
36
|
+
a code.literal {
|
37
|
+
color: #2980b9;
|
38
|
+
}
|
39
|
+
|
40
|
+
code,
|
41
|
+
div[class^=highlight] pre,
|
42
|
+
pre {
|
43
|
+
font-family: monospace;
|
44
|
+
font-size: 12px;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
#search-results {
|
49
|
+
li:last-child {
|
50
|
+
border-bottom: 0;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
@media screen and (max-width: 768px) {
|
54
|
+
.wy-nav-content-wrap {
|
55
|
+
.wy-nav-content {
|
56
|
+
padding: 1em;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
data/assets/404.md
ADDED
data/assets/data.json
ADDED
data/assets/favicon.png
ADDED
Binary file
|
data/assets/robots.txt
ADDED
data/assets/search.md
ADDED
data/assets/sitemap.xml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
layout: plugins/compress
|
3
|
+
permalink: /sitemap.xml
|
4
|
+
---
|
5
|
+
|
6
|
+
{%- include reset/html.liquid -%}
|
7
|
+
|
8
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
9
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
10
|
+
{%- for page in html_pages -%}
|
11
|
+
{% include reset/variables.liquid %}
|
12
|
+
<url>
|
13
|
+
<loc>{{ schema_url }}</loc>
|
14
|
+
<priority>0.{{ page.path | split: "/" | size }}</priority>
|
15
|
+
<lastmod>{{ schema_lastmod }}</lastmod>
|
16
|
+
</url>
|
17
|
+
{%- endfor %}
|
18
|
+
</urlset>
|
metadata
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-rtd-theme
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- saowang
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: github-pages
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '206'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '206'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
- saowang@outlook.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- LICENSE
|
35
|
+
- README.md
|
36
|
+
- _includes/addons/analytics/baidu.liquid
|
37
|
+
- _includes/addons/analytics/cnzz.liquid
|
38
|
+
- _includes/addons/analytics/google.liquid
|
39
|
+
- _includes/addons/seo/og.liquid
|
40
|
+
- _includes/addons/seo/schema.liquid
|
41
|
+
- _includes/addons/source/analytics.liquid
|
42
|
+
- _includes/addons/source/gems.liquid
|
43
|
+
- _includes/addons/source/github.liquid
|
44
|
+
- _includes/assets/404.liquid
|
45
|
+
- _includes/assets/data.liquid
|
46
|
+
- _includes/assets/js/script.js
|
47
|
+
- _includes/assets/search.liquid
|
48
|
+
- _includes/breadcrumbs.liquid
|
49
|
+
- _includes/footer.liquid
|
50
|
+
- _includes/i18n/en.liquid
|
51
|
+
- _includes/i18n/zh.liquid
|
52
|
+
- _includes/reset/content.liquid
|
53
|
+
- _includes/reset/html.liquid
|
54
|
+
- _includes/reset/i18n.liquid
|
55
|
+
- _includes/reset/navigation.liquid
|
56
|
+
- _includes/reset/snippets.liquid
|
57
|
+
- _includes/reset/start.liquid
|
58
|
+
- _includes/reset/title.liquid
|
59
|
+
- _includes/reset/variables.liquid
|
60
|
+
- _includes/searchbox.liquid
|
61
|
+
- _includes/sidebar.liquid
|
62
|
+
- _includes/versions.liquid
|
63
|
+
- _layouts/default.liquid
|
64
|
+
- _layouts/plugins/compress.liquid
|
65
|
+
- _sass/embed.scss
|
66
|
+
- _sass/fluid.scss
|
67
|
+
- _sass/style.scss
|
68
|
+
- assets/404.md
|
69
|
+
- assets/css/style.scss
|
70
|
+
- assets/data.json
|
71
|
+
- assets/favicon.png
|
72
|
+
- assets/robots.txt
|
73
|
+
- assets/search.md
|
74
|
+
- assets/sitemap.xml
|
75
|
+
homepage: https://github.com/rundocs/jekyll-rtd-theme
|
76
|
+
licenses:
|
77
|
+
- MIT
|
78
|
+
metadata: {}
|
79
|
+
post_install_message:
|
80
|
+
rdoc_options: []
|
81
|
+
require_paths:
|
82
|
+
- lib
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
requirements: []
|
94
|
+
rubyforge_project:
|
95
|
+
rubygems_version: 2.7.6
|
96
|
+
signing_key:
|
97
|
+
specification_version: 4
|
98
|
+
summary: Just another Jekyll theme for GitHub Pages based on ReadtheDocs's sphinx_rtd_theme
|
99
|
+
styles
|
100
|
+
test_files: []
|