jekyll-rtd-theme 0.1.4 → 0.1.5

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: fa084e105e7f1f43d2b77108d40d1473e042f6ee494ab82bfa8db1e44d539cb1
4
- data.tar.gz: 7c0d27c7853e7db2a4549ff1c025a6ced6ef6bf94e57091b6cf4fb7cfa330aba
3
+ metadata.gz: 38dce7565904ba703d3b6870eec6338eaefd2e4b5526bde0390503c91b4de99b
4
+ data.tar.gz: d5e3c38ee7c3ce55a1ed7fc8c90aa842ea1568ce8f2effba21a90443ce51621f
5
5
  SHA512:
6
- metadata.gz: e00ecb7d30ded86e7fe26ca2d9c1c787e4f083dae1d64d4ea80cb4e4b564ac1e8f1e94bf6872e2db837867f9168a3427508cb929089624aaef10983e0048c17b
7
- data.tar.gz: 0f329d07378034bf7787d77a7d3c334634a06e8d4c1e085a818fca81e8db9713bea1cb53b127bb28011d65e247e6b9fb030e540e0744f7ca7b66c5c030c0bc04
6
+ metadata.gz: fc3a218caea7780ce30300ccd4a35dc463daaeb3a1a85ad307b95d1b753f48c32cca9b731cbe05efda2f2600ad83684019eb3a41a1957944e26750eaf2c3142b
7
+ data.tar.gz: 07a279a1eab91ee5be3c0aa007b9f175f916cf431436f0aae9ba422519d7e32aca4e366e44d0d7750a9900e721fb204a83e883b1a2e0d5201aecab5850251b46
data/README.md CHANGED
@@ -1,50 +1,30 @@
1
1
  # jekyll-rtd-theme
2
- [![](https://github.com/rundocs/jekyll-rtd-theme/workflows/gh-pages/badge.svg)](https://github.com/rundocs/jekyll-rtd-theme)
3
- [![](https://img.shields.io/gem/v/jekyll-rtd-theme)][gem]
4
- [![](https://img.shields.io/gem/dt/jekyll-rtd-theme)][gem]
5
- [![](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)](https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme/)
6
- [![](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme/badge)](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme)
2
+ [![](https://github.com/rundocs/jekyll-rtd-theme/workflows/gh-pages/badge.svg)][repository]
3
+ [![](https://img.shields.io/gem/v/jekyll-rtd-theme)][rubygem]
4
+ [![](https://img.shields.io/gem/dt/jekyll-rtd-theme)][rubygem]
5
+ [![](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)][cdn]
6
+ [![](https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme/badge)][codefactor]
7
7
 
8
8
  Just another Jekyll theme for GitHub Pages based on ReadtheDocs's sphinx_rtd_theme styles
9
9
 
10
- ## Installation
11
- There are three ways to install: as a gem-based theme, as a remote theme (GitHub Pages compatible), use template
12
-
13
- #### Gem-based method
14
- 1. Add the following to your site's `Gemfile`
15
- ```ruby
16
- source "https://rubygems.org"
17
- gem "jekyll-rtd-theme"
18
- gem "github-pages", group: :jekyll_plugins
19
- ```
20
- 2. Add the following to your site's `_config.yml`
21
- ```yml
22
- theme: jekyll-rtd-theme
23
- title: Your awesome title
24
- description: Write an awesome description for your new site here
25
- ```
26
-
27
- #### Remote theme method
28
- 1. Add the following to your github repository's `_config.yml`
29
- ```yml
30
- remote_theme: rundocs/jekyll-rtd-theme
31
- ```
32
- 2. Remove any other `theme` or `remote_theme` entry
33
-
34
- #### Use template
35
- The new repository will generate with the same files and folders from [rundocs/starter](https://github.com/rundocs/starter/generate)
10
+ ![][demo]
36
11
 
37
12
  ## Roadmap
38
13
  See the [open issues][issues] for a list of proposed features (and known issues).
39
14
 
40
15
 
41
- ## Contributing
42
- 1. Clone down the theme's repository (`git clone https://github.com/rundocs/jekyll-rtd-theme.git`)
43
- 2. `cd` into the theme's directory
44
- 3. Run `bundle` to install the necessary dependencies
45
- 4. Run `bundle exec jekyll server` to start the preview server
46
- 5. Visit [`http://localhost:4000`](http://localhost:4000) in your browser to preview the theme
16
+ ## Documents
17
+ For complete documentation, see: [https://rundocs.github.io/jekyll-rtd-theme][site]
47
18
 
19
+ ## The License
20
+ The theme is available as open source under the terms of the [MIT License][license].
48
21
 
49
- [gem]: https://rubygems.org/gems/jekyll-rtd-theme
50
- [issues]: https://github.com/rundocs/jekyll-rtd-theme/issues
22
+
23
+ [repository]: https://github.com/rundocs/jekyll-rtd-theme
24
+ [issues]: https://github.com/rundocs/jekyll-rtd-theme/issues
25
+ [license]: https://github.com/rundocs/jekyll-rtd-theme/blob/master/LICENSE
26
+ [site]: https://rundocs.github.io/jekyll-rtd-theme
27
+ [rubygem]: https://rubygems.org/gems/jekyll-rtd-theme
28
+ [cdn]: https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme/
29
+ [codefactor]: https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme
30
+ [demo]: https://user-images.githubusercontent.com/68011645/88376699-87980500-cdd0-11ea-8900-7bab8c811bc9.png
@@ -59,6 +59,7 @@ $(document).ready(function() {
59
59
  $.getJSON("{{ site.baseurl }}/data.json", search);
60
60
  }
61
61
  admonition();
62
+ anchors.add();
62
63
  SphinxRtdTheme.Navigation.reset = reset;
63
64
  SphinxRtdTheme.Navigation.enable(true);
64
65
  });
@@ -1,26 +1,32 @@
1
1
  <div role="navigation" aria-label="breadcrumbs navigation">
2
2
  <ul class="wy-breadcrumbs">
3
- <li><a href="{{ site.baseurl }}/" class="icon icon-home"></a>&raquo;</li>
4
- {% case page.url %}
5
- {% when "/search.html" %}
3
+ <li>
4
+ <a href="{{ site.baseurl }}/" class="icon icon-home"></a><i class="fa fa-angle-double-right"></i>
5
+ </li>
6
+ {%- case page.url -%}
7
+ {%- when "/search.html" %}
6
8
  <li>{{ __search }}</li>
7
- {% when "/404.html" %}
9
+ {%- when "/404.html" %}
8
10
  <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 %}
11
+ {%- else -%}
12
+ {%- assign blocks = page.path | split: "/" -%}
13
+ {%- assign length = blocks | size -%}
14
+ {%- if page.dir == page.url and page.url != "/" -%}
15
+ {%- assign length = blocks | size | minus: 1 -%}
16
+ {%- endif -%}
17
+ {%- for block in blocks limit: length -%}
18
+ {%- if forloop.last %}
17
19
  <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> &raquo;</li>
21
- {% endif %}
22
- {% endfor %}
23
- {% endcase %}
20
+ {%- else -%}
21
+ {%- capture href -%}
22
+ {{ site.baseurl }}/{% for block in blocks limit: forloop.index %}{{ block | append: "/" }}{% endfor %}
23
+ {%- endcapture %}
24
+ <li>
25
+ <a href="{{ href }}">{{ block | split: "." | last | capitalize }}</a><i class="fa fa-angle-double-right"></i>
26
+ </li>
27
+ {%- endif -%}
28
+ {%- endfor -%}
29
+ {%- endcase %}
24
30
  <li class="wy-breadcrumbs-aside">
25
31
  <a href="{{ github_edit_link }}" class="fa fa-github" target="_blank"> {{ __edit }}</a>
26
32
  </li>
@@ -0,0 +1,6 @@
1
+ {%- include reset/html.liquid -%}
2
+ {%- include reset/workspace.liquid workspace=page.dir -%}
3
+
4
+ {%- for item in workspace_files %}
5
+ 1. [{{ item.title | default: item.url }}]({{ site.baseurl | append: item.url }})
6
+ {%- endfor -%}
@@ -1,5 +1,6 @@
1
1
  {%- assign html_pages = site.html_pages
2
2
  | sort: "path"
3
+ | sort: "sort"
3
4
  | where_exp: "item", "item.url != '/404.html'"
4
5
  | where_exp: "item", "item.url != '/search.html'" -%}
5
6
  {%- assign html_dirs = html_pages
@@ -1,28 +1,26 @@
1
1
  {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
2
2
  {%- assign schema_url = page.url | absolute_url | xml_escape -%}
3
3
  {%- assign schema_lastmod = site.time | date_to_xmlschema -%}
4
- {%- capture version %}{% include reset/version.spec %}{% endcapture -%}
4
+ {%- assign version = "0.1.5" -%}
5
+
6
+ {%- assign author = site.author | default: site.github.owner_name -%}
7
+ {%- assign commit = site.github.build_revision | slice: 0, 7 -%}
8
+ {%- assign repository_url = site.github.repository_url -%}
5
9
 
6
10
  {%- if site.debug -%}
7
11
  {%- assign cdn = site.baseurl -%}
8
12
  {%- else -%}
9
- {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version | strip -%}
13
+ {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
10
14
  {%- endif -%}
11
15
 
12
- {%- unless jekyll.environment == "production" -%}
13
- {%- assign author = site.author | default: "[author]" -%}
14
- {%- assign commit = "[commit]" -%}
15
- {%- assign repository_url = "[repository_url]" -%}
16
- {%- assign zip_url = "[zip_url]" -%}
17
- {%- assign issues_url = "[issues_url]" -%}
18
- {%- assign github_edit_link = "[github_edit_link]" -%}
19
- {%- else -%}
20
- {%- assign author = site.author | default: site.github.owner_name -%}
21
- {%- assign commit = site.github.build_revision | slice: 0, 7 -%}
22
- {%- assign repository_url = site.github.repository_url -%}
23
- {%- assign zip_url = site.github.zip_url -%}
16
+ {%- if jekyll.environment == "production" -%}
24
17
  {%- assign issues_url = site.github.issues_url -%}
18
+ {%- assign zip_url = site.github.zip_url -%}
25
19
  {%- capture github_edit_link %}{% github_edit_link %}{% endcapture -%}
26
- {%- endunless -%}
20
+ {%- else -%}
21
+ {%- assign issues_url = "#" -%}
22
+ {%- assign zip_url = "#" -%}
23
+ {%- assign github_edit_link = "#" -%}
24
+ {%- endif -%}
27
25
 
28
26
  {%- assign addons = site.addons | default: "github, gems, analytics" -%}
@@ -15,6 +15,9 @@
15
15
  {%- endcapture %}
16
16
  <li class="toctree-l{{ level }} {{ current }}">
17
17
  <a class="reference internal {{ current }}" href="{{ site.baseurl | append: item.url }}">
18
+ {%- if item.sort -%}
19
+ {{ item.sort }}.
20
+ {%- endif %}
18
21
  {{ item.title | default: item.url }}
19
22
  </a>
20
23
  </li>
@@ -40,6 +40,7 @@ layout: plugins/compress
40
40
  <!-- script -->
41
41
  <script src="{{ cdn }}/assets/js/jquery.min.js"></script>
42
42
  <script src="{{ cdn }}/assets/js/theme.js"></script>
43
+ <script src="{{ cdn }}/assets/js/anchor.min.js"></script>
43
44
  <script>{{ site_script }}</script>
44
45
  </head>
45
46
 
@@ -1,4 +1,4 @@
1
- {%- if site.debug -%}
1
+ {%- if site.debug.compress == false -%}
2
2
  {{ content }}
3
3
  {%- else -%}
4
4
  {%- assign items = content | split: "<pre" -%}
@@ -11,6 +11,10 @@ footer {
11
11
  }
12
12
  }
13
13
 
14
+ .fa-angle-double-right {
15
+ font-size: 13px;
16
+ }
17
+
14
18
  .rst-versions {
15
19
  &.shift-up {
16
20
  overflow-y: auto;
@@ -0,0 +1,9 @@
1
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
2
+ //
3
+ // AnchorJS - v4.2.2 - 2019-11-14
4
+ // https://www.bryanbraun.com/anchorjs/
5
+ // Copyright (c) 2019 Bryan Braun; Licensed MIT
6
+ //
7
+ // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
8
+ !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
9
+ // @license-end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-rtd-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - saowang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2020-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-pages
@@ -49,6 +49,7 @@ files:
49
49
  - _includes/footer.liquid
50
50
  - _includes/i18n/en.liquid
51
51
  - _includes/i18n/zh.liquid
52
+ - _includes/list.liquid
52
53
  - _includes/reset/content.liquid
53
54
  - _includes/reset/html.liquid
54
55
  - _includes/reset/i18n.liquid
@@ -57,7 +58,6 @@ files:
57
58
  - _includes/reset/start.liquid
58
59
  - _includes/reset/title.liquid
59
60
  - _includes/reset/variables.liquid
60
- - _includes/reset/version.spec
61
61
  - _includes/reset/workspace.liquid
62
62
  - _includes/searchbox.liquid
63
63
  - _includes/toctree_l1.liquid
@@ -112,6 +112,7 @@ files:
112
112
  - assets/css/theme.css
113
113
  - assets/data.json
114
114
  - assets/favicon.svg
115
+ - assets/js/anchor.min.js
115
116
  - assets/js/jquery.min.js
116
117
  - assets/js/theme.js
117
118
  - assets/robots.txt
@@ -137,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
138
  version: '0'
138
139
  requirements: []
139
140
  rubyforge_project:
140
- rubygems_version: 2.7.6
141
+ rubygems_version: 2.7.7
141
142
  signing_key:
142
143
  specification_version: 4
143
144
  summary: Just another Jekyll theme for GitHub Pages based on ReadtheDocs's sphinx_rtd_theme
@@ -1 +0,0 @@
1
- 0.1.4