jekyll-rtd-theme 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ec9e0b342599501734319987d2e9e126b1ec68f9fda65b68f3e8db033af4057
4
- data.tar.gz: f5f5cc84de3b2676732e3cd9df4b85bdd61ec6a44814a6b9d9e1e4abb990c035
3
+ metadata.gz: a12e67932cfe2e811f10cbe9a3e7bf276f47b06cbd21f37e6975689b9ed2bf65
4
+ data.tar.gz: 40448cc7793251a98c3d0e22f7d5a7d9534be8ebf7df216ef246f8529a433cf3
5
5
  SHA512:
6
- metadata.gz: 492da44c0119656b6c917da857df833b41d519a2c3a74505cdf2cb2aa702ccfdb2a015e7b7627aab4362297513033a54fca19c3fe0ee0a108397b97bb21b92a8
7
- data.tar.gz: 7a42ad86878239b5afe11a02d747c2ab28c484f66064d69266559adc400b2179ae4eaf5e6c95befa7d0b860648e114add25a79d06c2940c937192e0fb29383a2
6
+ metadata.gz: 8fde10bac64b04ce72638df78452ee1b5fdb35fe9abd8041899f12a6a417471712af7ec79462eb8406b6fbbe4101a6101e1e1ca2ecad3ce962fab8e6ac76a205
7
+ data.tar.gz: ffd8272abdb7b7079803171cfffe4814e54b553ad620ba3e441565c392c75c1556773c35404f5009ba0f0f769179a68fd262a07aea78f7c8f2d26a5787bad027
data/README.md CHANGED
@@ -1,7 +1,10 @@
1
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)
2
+ ![gh-pages](https://github.com/rundocs/jekyll-rtd-theme/workflows/gh-pages/badge.svg)
3
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-rtd-theme)][gem]
4
+ [![Gem Downloads](https://img.shields.io/gem/dt/jekyll-rtd-theme)][gem]
5
+ [![Users](https://img.shields.io/endpoint?url=https://rundocs-analytics.glitch.me/shields)](https://github.com/rundocs/analytics)
6
+ [![Jsdelivr hits](https://data.jsdelivr.com/v1/package/gh/rundocs/static/badge)](https://cdn.jsdelivr.net/gh/rundocs/static/)
7
+ [![CodeFactor](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme/badge)](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>
@@ -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 sidebar.liquid %}
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.0
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/sidebar.liquid
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
@@ -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>