jekyll-rtd-theme 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/_includes/reset/workspace.liquid +17 -0
- data/_includes/toctree_l1.liquid +17 -0
- data/_includes/toctree_ln.liquid +26 -0
- data/_layouts/default.liquid +1 -1
- metadata +4 -2
- data/_includes/sidebar.liquid +0 -52
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a12e67932cfe2e811f10cbe9a3e7bf276f47b06cbd21f37e6975689b9ed2bf65
|
|
4
|
+
data.tar.gz: 40448cc7793251a98c3d0e22f7d5a7d9534be8ebf7df216ef246f8529a433cf3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8fde10bac64b04ce72638df78452ee1b5fdb35fe9abd8041899f12a6a417471712af7ec79462eb8406b6fbbe4101a6101e1e1ca2ecad3ce962fab8e6ac76a205
|
|
7
|
+
data.tar.gz: ffd8272abdb7b7079803171cfffe4814e54b553ad620ba3e441565c392c75c1556773c35404f5009ba0f0f769179a68fd262a07aea78f7c8f2d26a5787bad027
|
data/README.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
# jekyll-rtd-theme
|
|
2
|
-

|
|
3
|
+
[][gem]
|
|
4
|
+
[][gem]
|
|
5
|
+
[](https://github.com/rundocs/analytics)
|
|
6
|
+
[](https://cdn.jsdelivr.net/gh/rundocs/static/)
|
|
7
|
+
[](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme)
|
|
5
8
|
|
|
6
9
|
Just another Jekyll theme for GitHub Pages based on ReadtheDocs's sphinx_rtd_theme styles
|
|
7
10
|
|
|
@@ -12,7 +15,9 @@ There are two ways to install: as a gem-based theme, as a remote theme (GitHub P
|
|
|
12
15
|
1. Add the following to your github repository's `Gemfile`
|
|
13
16
|
```ruby
|
|
14
17
|
source "https://rubygems.org"
|
|
18
|
+
|
|
15
19
|
gem "jekyll-rtd-theme"
|
|
20
|
+
|
|
16
21
|
gem "github-pages", group: :jekyll_plugins
|
|
17
22
|
```
|
|
18
23
|
2. Add the following to your github repository's `_config.yml`
|
|
@@ -40,4 +45,5 @@ See the [open issues][issues] for a list of proposed features (and known issues)
|
|
|
40
45
|
5. Visit [`http://localhost:4000`](http://localhost:4000) in your browser to preview the theme
|
|
41
46
|
|
|
42
47
|
|
|
48
|
+
[gem]: https://rubygems.org/gems/jekyll-rtd-theme
|
|
43
49
|
[issues]: https://github.com/rundocs/jekyll-rtd-theme/issues
|
|
@@ -0,0 +1,17 @@
|
|
|
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: "|" -%}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{%- include reset/workspace.liquid %}
|
|
2
|
+
|
|
3
|
+
<ul>
|
|
4
|
+
{%- for item in workspace_files -%}
|
|
5
|
+
{%- assign level = item.dir | append: "temp/" | split: "/" | size | minus: 1 -%}
|
|
6
|
+
{%- capture current -%}
|
|
7
|
+
{%- if page.url == item.url %}current{% endif -%}
|
|
8
|
+
{%- endcapture %}
|
|
9
|
+
<li class="toctree-l{{ level }} {{ current }}">
|
|
10
|
+
<a class="reference internal {{ current }}" href="{{ site.baseurl | append: item.url }}">
|
|
11
|
+
{{ item.title | default: item.url }}
|
|
12
|
+
</a>
|
|
13
|
+
</li>
|
|
14
|
+
{%- endfor %}
|
|
15
|
+
</ul>
|
|
16
|
+
|
|
17
|
+
{%- for workspace in workspace_dirs %}{% include toctree_ln.liquid %}{% endfor -%}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{%- include reset/workspace.liquid %}
|
|
2
|
+
|
|
3
|
+
{%- assign dir = html_pages | where: "url", workspace | first -%}
|
|
4
|
+
{%- if workspace_level == 2 %}
|
|
5
|
+
<p class="caption"><span class="caption-text">{{ dir.title | default: dir.url }}</span></p>
|
|
6
|
+
{%- else %}
|
|
7
|
+
<a class="reference internal" href="{{ site.baseurl | append: dir.url }}">{{ dir.title | default: dir.url }}</a>
|
|
8
|
+
{%- endif -%}
|
|
9
|
+
|
|
10
|
+
<ul>
|
|
11
|
+
{%- for item in workspace_files -%}
|
|
12
|
+
{%- assign level = item.dir | append: "temp/" | split: "/" | size | minus: 2 -%}
|
|
13
|
+
{%- capture current -%}
|
|
14
|
+
{%- if page.url == item.url %}current{% endif -%}
|
|
15
|
+
{%- endcapture %}
|
|
16
|
+
<li class="toctree-l{{ level }} {{ current }}">
|
|
17
|
+
<a class="reference internal {{ current }}" href="{{ site.baseurl | append: item.url }}">
|
|
18
|
+
{{ item.title | default: item.url }}
|
|
19
|
+
</a>
|
|
20
|
+
</li>
|
|
21
|
+
{%- endfor -%}
|
|
22
|
+
{%- for workspace in workspace_dirs -%}
|
|
23
|
+
{%- assign level = workspace | append: "temp/" | split: "/" | size | minus: 3 %}
|
|
24
|
+
<li class="toctree-l{{ level }}">{% include toctree_ln.liquid %}</li>
|
|
25
|
+
{%- endfor -%}
|
|
26
|
+
</ul>
|
data/_layouts/default.liquid
CHANGED
|
@@ -59,7 +59,7 @@ layout: plugins/compress
|
|
|
59
59
|
{% include searchbox.liquid %}
|
|
60
60
|
</div>
|
|
61
61
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
62
|
-
{% include
|
|
62
|
+
{% include toctree_l1.liquid %}
|
|
63
63
|
</div>
|
|
64
64
|
{%- if site.embed -%}
|
|
65
65
|
<div class="wy-embed-wrap">
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-rtd-theme
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- saowang
|
|
@@ -57,8 +57,10 @@ files:
|
|
|
57
57
|
- _includes/reset/start.liquid
|
|
58
58
|
- _includes/reset/title.liquid
|
|
59
59
|
- _includes/reset/variables.liquid
|
|
60
|
+
- _includes/reset/workspace.liquid
|
|
60
61
|
- _includes/searchbox.liquid
|
|
61
|
-
- _includes/
|
|
62
|
+
- _includes/toctree_l1.liquid
|
|
63
|
+
- _includes/toctree_ln.liquid
|
|
62
64
|
- _includes/versions.liquid
|
|
63
65
|
- _layouts/default.liquid
|
|
64
66
|
- _layouts/plugins/compress.liquid
|
data/_includes/sidebar.liquid
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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>
|