jekyll-rtd-theme 1.1.8 → 2.0.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +23 -65
  4. data/_includes/addons/analytics.liquid +4 -4
  5. data/_includes/addons/github.liquid +7 -10
  6. data/_includes/breadcrumbs.liquid +27 -0
  7. data/_includes/extend/list.liquid +2 -2
  8. data/_includes/{reset → extend}/tabs.liquid +0 -0
  9. data/_includes/extend/toctree.liquid +6 -5
  10. data/_includes/footer.liquid +36 -0
  11. data/_includes/reset/defaults.liquid +25 -60
  12. data/_includes/reset/workdir.liquid +1 -0
  13. data/_includes/safe/shortcodes.liquid +9 -0
  14. data/_includes/shortcodes/danger.liquid +3 -2
  15. data/_includes/shortcodes/note.liquid +3 -2
  16. data/_includes/shortcodes/tip.liquid +3 -2
  17. data/_includes/shortcodes/warning.liquid +3 -2
  18. data/_includes/{class/_toctree.liquid → toctree.liquid} +2 -2
  19. data/_layouts/default.liquid +182 -23
  20. data/_layouts/plugins/extension.liquid +6 -8
  21. data/_sass/@primer/base/base.scss +90 -0
  22. data/_sass/@primer/base/index.scss +6 -0
  23. data/_sass/@primer/base/kbd.scss +21 -0
  24. data/_sass/@primer/base/normalize.scss +423 -0
  25. data/_sass/@primer/base/typography-base.scss +100 -0
  26. data/_sass/@primer/breadcrumb/breadcrumb.scss +28 -0
  27. data/_sass/@primer/breadcrumb/index.scss +3 -0
  28. data/_sass/@primer/buttons/button-group.scss +91 -0
  29. data/_sass/@primer/buttons/button.scss +296 -0
  30. data/_sass/@primer/buttons/index.scss +4 -0
  31. data/_sass/@primer/buttons/misc.scss +205 -0
  32. data/_sass/@primer/forms/form-control.scss +278 -0
  33. data/_sass/@primer/forms/form-group.scss +279 -0
  34. data/_sass/@primer/forms/form-select.scss +38 -0
  35. data/_sass/@primer/forms/form-validation.scss +369 -0
  36. data/_sass/@primer/forms/index.scss +7 -0
  37. data/_sass/@primer/forms/input-group.scss +53 -0
  38. data/_sass/@primer/forms/radio-group.scss +43 -0
  39. data/_sass/@primer/markdown/blob-csv.scss +31 -0
  40. data/_sass/@primer/markdown/code.scss +73 -0
  41. data/_sass/@primer/markdown/headings.scss +72 -0
  42. data/_sass/@primer/markdown/images.scss +131 -0
  43. data/_sass/@primer/markdown/index.scss +8 -0
  44. data/_sass/@primer/markdown/lists.scss +76 -0
  45. data/_sass/@primer/markdown/markdown-body.scss +99 -0
  46. data/_sass/@primer/markdown/tables.scss +38 -0
  47. data/_sass/@primer/support/index.scss +11 -0
  48. data/_sass/@primer/support/mixins/buttons.scss +184 -0
  49. data/_sass/@primer/support/mixins/layout.scss +55 -0
  50. data/_sass/@primer/support/mixins/misc.scss +32 -0
  51. data/_sass/@primer/support/mixins/typography.scss +88 -0
  52. data/_sass/@primer/support/variables/color-system.scss +243 -0
  53. data/_sass/@primer/support/variables/colors.scss +55 -0
  54. data/_sass/@primer/support/variables/layout.scss +149 -0
  55. data/_sass/@primer/support/variables/misc.scss +42 -0
  56. data/_sass/@primer/support/variables/typography.scss +43 -0
  57. data/_sass/@primer/utilities/animations.scss +187 -0
  58. data/_sass/@primer/utilities/borders.scss +184 -0
  59. data/_sass/@primer/utilities/box-shadow.scss +25 -0
  60. data/_sass/@primer/utilities/colors.scss +185 -0
  61. data/_sass/@primer/utilities/details.scss +34 -0
  62. data/_sass/@primer/utilities/flexbox.scss +121 -0
  63. data/_sass/@primer/utilities/index.scss +14 -0
  64. data/_sass/@primer/utilities/layout.scss +134 -0
  65. data/_sass/@primer/utilities/margin.scss +68 -0
  66. data/_sass/@primer/utilities/padding.scss +59 -0
  67. data/_sass/@primer/utilities/typography.scss +325 -0
  68. data/_sass/@primer/utilities/visibility-display.scss +82 -0
  69. data/_sass/_font-face.scss +65 -0
  70. data/_sass/_icons.scss +53 -0
  71. data/_sass/_layout.scss +76 -0
  72. data/_sass/_reset.scss +21 -0
  73. data/_sass/_root.scss +9 -0
  74. data/_sass/_variables.scss +29 -0
  75. data/_sass/class/addons-wrap.scss +39 -0
  76. data/_sass/class/container.scss +11 -0
  77. data/_sass/class/content-wrap.scss +4 -0
  78. data/_sass/class/header.scss +10 -0
  79. data/_sass/{highlight.scss → class/highlight.scss} +0 -0
  80. data/_sass/class/markdown-body.scss +49 -0
  81. data/_sass/class/sidebar-wrap.scss +72 -0
  82. data/_sass/class/title.scss +13 -0
  83. data/_sass/theme.scss +26 -12
  84. data/assets/404.liquid +1 -3
  85. data/assets/css/theme.min.css +1 -4
  86. data/assets/css/theme.scss +4 -0
  87. data/assets/js/mermaid.min.js +6 -5
  88. data/assets/js/search.js +90 -0
  89. data/assets/js/theme.js +55 -121
  90. data/assets/js/theme.min.js +1 -1
  91. data/assets/search.liquid +9 -1
  92. metadata +74 -25
  93. data/_includes/assets/custom.js +0 -0
  94. data/_includes/assets/custom.scss +0 -0
  95. data/_includes/class/_breadcrumbs.liquid +0 -28
  96. data/_includes/class/_footer.liquid +0 -38
  97. data/_includes/class/rst-versions.liquid +0 -22
  98. data/_includes/class/wy-nav-content.liquid +0 -15
  99. data/_includes/class/wy-nav-side.liquid +0 -18
  100. data/_includes/class/wy-nav-top.liquid +0 -8
  101. data/_includes/extra/footer.html +0 -0
  102. data/_includes/extra/head.html +0 -0
  103. data/_includes/node/links.liquid +0 -24
  104. data/_includes/node/metadata.liquid +0 -21
  105. data/_includes/node/script.extension.liquid +0 -29
  106. data/_includes/node/script.liquid +0 -20
  107. data/_includes/node/script.schema.liquid +0 -27
  108. data/_includes/node/title.liquid +0 -1
  109. data/_includes/reset/i18n.liquid +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d69e021f3df96ab3b9714d64e1d216601712e009ddb08aed35d7e7837e4ef86c
4
- data.tar.gz: cf6b6baace1113759c0cffc4b1e097ae02f0369ec8d094a52ad500846aba4d8f
3
+ metadata.gz: 15185d69e5df3312de8226fdf843da12d6f1cbc754a0b439c0be998be05fe524
4
+ data.tar.gz: ede7f10389e609983db0b3429ad717366016205c4c19447fe2db68056596d7b1
5
5
  SHA512:
6
- metadata.gz: dc8d4eb1046e999f051855a27c521a043786df3d5961270fa6e1841d353875e96a02d2e0c0d5d4e329e14ba2448d62ce90fb99b54cb2a93b548bb9eb1f58a01e
7
- data.tar.gz: a942afc0ac6fe9511159571c5235814a3579ac7058fd5376fc57588de94a56101bd9f49080122168b710b0db35a7d482990b14a616a0db802c796bfb5cb5d72f
6
+ metadata.gz: 1dc680274eb05e270130ec057f902794f53b622af56dfe222d194d53d0fc90e3598c16d52c0b7cf84b71f53406d81fd480be150f06c54ee3228a9fbafae49037
7
+ data.tar.gz: 611d1d5a0752e19bb708b55f3f878a1747f447e5348f7b8b98265befe6af025482275b5babfe042e7e7d21cda4140d6a900208fae9ba0f2fe2287a8a6553e70d
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 RunDocs & contributors
3
+ Copyright (c) 2020 RunDocs
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,85 +1,43 @@
1
1
  # jekyll-rtd-theme
2
2
 
3
- ![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)
4
- ![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)
3
+ [![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)][repository]
4
+ [![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)][cdn]
5
5
 
6
- Opinionated github flavored standard document theme for open source projects, with few options, but everything!
7
-
8
- ## What it does?
9
-
10
- This theme(`v1`) use [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme)'s styles
11
-
12
- Solved the issue of open source project documentation site
13
-
14
- - No need to learn other programming languages for building documentation
15
- - No need to care about the site SEO
16
- - Native support for mermaid chart plugin
6
+ Opinionated github flavored documentation theme for open source projects
17
7
 
18
8
  ## Quick start
19
9
 
20
10
  ```yml
21
- remote_theme: rundocs/jekyll-rtd-theme@v1
11
+ remote_theme: rundocs/jekyll-rtd-theme
22
12
  ```
23
13
 
24
14
  You can [generate](https://github.com/rundocs/starter-slim/generate) with the same files and folders from [rundocs/starter-slim](https://github.com/rundocs/starter-slim/)
25
15
 
26
- ## Options
27
-
28
- ```yml
29
- title: Your awesome title
30
- lang: # default: en
31
- description: Write an awesome description for your new site here
32
-
33
- readme_index:
34
- with_frontmatter: true
16
+ ## Features
35
17
 
36
- ## optional settings ##
37
- meta:
38
- key1: value1
39
- key2: value2
18
+ - Automatically generate nested sidebar based on directory
19
+ - Multi-language supported
20
+ - Search engine optimized
21
+ - Document search (RegExp supported)
22
+ - Support third-party comments
23
+ - Google, Baidu, CNZZ Analytics supported
24
+ - Just need one file `_config.yml` to configure site
40
25
 
41
- google:
42
- gtag:
43
- adsense:
26
+ ## Documents
44
27
 
45
- mermaid:
46
- custom: # mermaid link
47
- initialize: # mermaid options, default: {}
28
+ For full documentation, please refer to our website ([rundocs.io](https://rundocs.io/)) for details
48
29
 
49
- # also available via file: _include/assets/custom.scss
50
- scss:
30
+ ### test
51
31
 
52
- # also available via file: _include/assets/custom.js
53
- script:
54
-
55
- # also available via file: _data/translate.yml
56
- translate:
57
- # shortcodes
58
- danger:
59
- note:
60
- tip:
61
- warning:
62
- # 404
63
- not_found:
64
- # search
65
- searching:
66
- search:
67
- search_docs:
68
- search_results:
69
- search_results_found: # the "#" in this translate will replaced with results size!
70
- search_results_not_found:
71
-
72
- ## optional plugins ##
73
- plugins:
74
- - jemoji
75
- - jekyll-avatar
76
- - jekyll-mentions
77
- ```
78
-
79
- ## Waiting
80
-
81
- Document writing specifications, please refer to [rundocs.io](https://rundocs.io) for details
32
+ - Latest test document: [rundocs.github.io/jekyll-rtd-theme](https://rundocs.github.io/jekyll-rtd-theme)
33
+ - Preview debug branch, please refer to [rundocs.github.io/debug](https://rundocs.github.io/debug)
82
34
 
83
35
  ## The license
84
36
 
85
37
  The theme is available as open source under the terms of the MIT License
38
+
39
+ [repository]: https://github.com/rundocs/jekyll-rtd-theme
40
+ [rubygem]: https://rubygems.org/gems/jekyll-rtd-theme
41
+ [cdn]: https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme/
42
+ [codefactor]: https://www.codefactor.io/repository/github/rundocs/jekyll-rtd-theme
43
+ [gitter]: https://gitter.im/rundocs/jekyll-rtd-theme?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
@@ -1,10 +1,10 @@
1
1
  <dl>
2
- <dt>{{ __.statistics | default: "Statistics" }}</dt>
2
+ <dt>{{ site.data.translate.statistics | default: "Statistics" }}</dt>
3
3
  <dd>
4
- <a href="https://github.com/rundocs/analytics" rel="noreferrer" target="_blank">
5
- {{ __.total_visits | default: "Total visits" }}:
4
+ <a href="https://github.com/rundocs/analytics" target="_blank">
5
+ {{ site.data.translate.total_visits | default: "Total visits" }}:
6
6
  <span id="counter">
7
- <span class="AnimatedEllipsis"></span>
7
+ <span class="progress"></span>
8
8
  </span>
9
9
  </a>
10
10
  </dd>
@@ -1,21 +1,18 @@
1
1
  <dl>
2
- <dt>{{ __.github | default: "GitHub" }}</dt>
2
+ <dt>{{ site.data.translate.github | default: "GitHub" }}</dt>
3
3
  <dd>
4
- <a href="{{ docs.repository_url }}" title="{{ __.stars | default: 'Stars' }}: {{ rest.stargazers_count }}">
5
- <i class="fa fa-github"></i>
6
- {{ __.homepage | default: "Homepage" }}
4
+ <a href="{{ site.github.repository_url }}">
5
+ <i class="fa fa-github"></i> {{ site.data.translate.homepage | default: "HomePage" }}
7
6
  </a>
8
7
  </dd>
9
8
  <dd>
10
- <a href="{{ docs.issues_url }}" title="{{ __.open_issues | default: 'Open issues' }}: {{ rest.open_issues }}">
11
- <i class="fa fa-question-circle-o"></i>
12
- {{ __.issues | default: "Issues" }}
9
+ <a href="{{ site.github.issues_url }}">
10
+ <i class="fa fa-question-circle-o"></i> {{ site.data.translate.issues | default: "Issues" }}
13
11
  </a>
14
12
  </dd>
15
13
  <dd>
16
- <a href="{{ docs.zip_url }}" title="{{ __.size | default: 'Size' }}: {{ rest.size }} Kb">
17
- <i class="fa fa-download"></i>
18
- {{ __.download | default: "Download" }}
14
+ <a href="{{ site.github.zip_url }}">
15
+ <i class="fa fa-download"></i> {{ site.data.translate.download | default: "Download" }}
19
16
  </a>
20
17
  </dd>
21
18
  </dl>
@@ -0,0 +1,27 @@
1
+ <div class="navigation-top d-flex flex-justify-between">
2
+ <ul class="breadcrumb" role="navigation" aria-label="breadcrumbs navigation">
3
+ <li class="breadcrumb-item">
4
+ <a href="{{ site.baseurl }}/" title="{{ site.github.source.branch }}"><i class="fa fa-home"></i></a>
5
+ </li>
6
+ {%- case page.url -%}
7
+ {%- when "/search.html" -%}
8
+ <li class="breadcrumb-item" aria-current="page">{{ site.data.translate.search | default: "Search" }}</li>
9
+ {%- when "/404.html" -%}
10
+ <li class="breadcrumb-item" aria-current="page">404</li>
11
+ {%- else -%}
12
+ {%- assign blocks = page.path | split: "/" -%}
13
+ {%- for block in blocks -%}
14
+ <li class="breadcrumb-item" {% if forloop.last %}aria-current{% endif %}>
15
+ {%- if forloop.last -%}
16
+ {{ page.name }}
17
+ {%- else -%}
18
+ <a href="{{ site.baseurl }}/{% for block in blocks limit: forloop.index %}{{ block }}/{% endfor %}">{{ block }}</a>
19
+ {%- endif -%}
20
+ </li>
21
+ {%- endfor -%}
22
+ {%- endcase -%}
23
+ </ul>
24
+ <a class="edit" href="{% github_edit_link %}" title="{{ site.data.translate.edit | default: 'Edit on GitHub'}}" target="_blank">
25
+ <i class="fa fa-edit"></i>
26
+ </a>
27
+ </div>
@@ -6,10 +6,10 @@
6
6
  {%- assign size_p1 = size | plus: 1 -%}
7
7
 
8
8
  {%- assign dir = site_pages | where: "url", workdir | first %}
9
- {% include reset/tabs.liquid size=size %}- [{{ dir.title | default: dir.url }}]({{ dir.url | relative_url }})
9
+ {% include extend/tabs.liquid size=size %}- [{{ dir.title | default: dir.url }}]({{ dir.url | relative_url }})
10
10
 
11
11
  {%- for item in workdir_files %}
12
- {% include reset/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.url }}]({{ item.url | relative_url }})
12
+ {% include extend/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.url }}]({{ item.url | relative_url }})
13
13
  {%- endfor -%}
14
14
 
15
15
  {%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
File without changes
@@ -2,11 +2,12 @@
2
2
 
3
3
  {% comment %} display the directory name {% endcomment %}
4
4
  {%- assign dir = site_pages | where: "url", workdir | first -%}
5
+
5
6
  {%- if workdir_level == 2 %}
6
7
  {% comment %} display the root sub-directory as "p.caption" {% endcomment %}
7
- <p class="caption"><span class="caption-text">{{ dir.title | default: dir.url }}</span></p>
8
+ <p class="caption text-uppercase no-wrap px-2 mb-0">{{ dir.title | default: dir.url }}</p>
8
9
  {%- else %}
9
- <a class="reference internal" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
10
+ <a class="d-flex" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
10
11
  {%- endif -%}
11
12
 
12
13
  <ul>
@@ -17,8 +18,8 @@
17
18
  {%- if page.url == item.url %}current{% endif -%}
18
19
  {%- endcapture %}
19
20
 
20
- <li class="toctree-l{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
21
- <a class="reference internal {{ current }}" href="{{ item.url | relative_url }}">
21
+ <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
22
+ <a class="d-flex {{ current }}" href="{{ item.url | relative_url }}">
22
23
  {%- if item.sort and site.show_sorted != false -%}
23
24
  {{ item.sort }}. {{ item.title | default: item.url }}
24
25
  {%- else -%}
@@ -31,6 +32,6 @@
31
32
  {% comment %} list dirs {% endcomment %}
32
33
  {%- for workdir in workdir_dirs -%}
33
34
  {%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
34
- <li class="toctree-l{{ level }}">{% include extend/toctree.liquid %}</li>
35
+ <li class="toc level-{{ level }}">{% include extend/toctree.liquid %}</li>
35
36
  {%- endfor -%}
36
37
  </ul>
@@ -0,0 +1,36 @@
1
+ {% comment %} prev and next {% endcomment %}
2
+ {%- if page.url != "/search.html" and page.url != "/404.html" -%}
3
+ {%- if next or prev -%}
4
+ <div class="navigation-bottom d-flex flex-justify-between py-3" role="navigation" aria-label="footer navigation">
5
+ <div class="prev">
6
+ {%- if prev -%}
7
+ <a href="{{ prev.url | relative_url }}" class="btn" title="{{ prev.title }}" accesskey="p" rel="prev">
8
+ <i class="fa fa-arrow-circle-left"></i> {{ site.data.translate.previous | default: "Previous" }}
9
+ </a>
10
+ {%- endif -%}
11
+ </div>
12
+ <div class="next">
13
+ {%- if next -%}
14
+ <a href="{{ next.url | relative_url }}" class="btn" title="{{ next.title }}" accesskey="n" rel="next">
15
+ {{ site.data.translate.next | default: "Next" }} <i class="fa fa-arrow-circle-right"></i>
16
+ </a>
17
+ {%- endif -%}
18
+ </div>
19
+ </div>
20
+ {%- endif -%}
21
+ {%- endif -%}
22
+
23
+ <hr>
24
+
25
+ <div class="copyright text-center text-gray" role="contentinfo">
26
+ <i class="fa fa-copyright"></i>
27
+ {%- if site.rundocs.since %}{{ site.rundocs.since }}-{% endif -%}
28
+ {{- site.time | date: "%Y" }},
29
+ <a class="text-gray" href="{{ site.github.owner_url }}" target="_blank">
30
+ {{ site.github.owner_name }}
31
+ </a>
32
+ {{ site.data.translate.revision | default: "Revision" }}
33
+ <a class="text-gray" href="{{ site.github.repository_url }}/commit/{{ site.github.build_revision }}" title="{{ site.github.build_revision }}" target="_blank">
34
+ {{ site.github.build_revision | slice: 0, 7 }}
35
+ </a>
36
+ </div>
@@ -1,89 +1,54 @@
1
- {%- comment %} Copy from v2 unless content {% endcomment -%}
2
-
3
- {%- include reset/site_pages.liquid -%}
4
- {%- include reset/i18n.liquid -%}
5
-
6
- {%- comment %} variables {% endcomment -%}
7
- {%- assign version = "1.1.8" -%}
8
- {%- assign docs = site.github -%}
9
- {%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
1
+ {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
2
+ {%- assign version = "2.0.0-beta" -%}
10
3
 
11
- {%- assign rest_created_at = rest.created_at | default: site.time -%}
12
- {%- assign rest_updated_at = rest.updated_at | default: site.time -%}
4
+ {%- assign schema_date = page.date | default: site.time | date_to_xmlschema -%}
5
+ {%- assign schema_modi = site.time | date_to_xmlschema -%}
6
+ {%- assign schema_surl = page.url | absolute_url | xml_escape -%}
13
7
 
14
- {%- assign lang = site.lang | default: "en" -%}
15
- {%- assign author = docs.owner.name | default: docs.owner_name -%}
8
+ {% comment %} cdn {% endcomment %}
9
+ {%- if site.debug -%}
10
+ {%- assign cdn = site.baseurl -%}
11
+ {%- else -%}
12
+ {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
13
+ {%- endif -%}
16
14
 
17
- {%- comment %} schema {% endcomment -%}
18
- {%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
19
- {%- assign schema_modi = site.time | date_to_xmlschema -%}
20
- {%- assign schema_surl = page.url | absolute_url | xml_escape -%}
15
+ {%- include reset/site_pages.liquid %}
21
16
 
22
- {%- comment %} title {% endcomment -%}
17
+ {% comment %} title {% endcomment %}
23
18
  {%- case page.url -%}
24
19
  {%- when "/" -%}
25
- {%- assign title = site.title | append: " · " | append: site.description | truncate: 110 -%}
20
+ {%- assign title = site.title | append: " · " | append: site.description -%}
26
21
  {%- when "/search.html" -%}
27
- {%- assign title = __.search | default: "Search" | append: " · " | append: site.title | truncate: 110 -%}
22
+ {%- assign title = __search | append: " · " | append: site.title -%}
28
23
  {%- when "/404.html" -%}
29
- {%- assign title = "404" | append: " · " | append: site.title | truncate: 110 -%}
24
+ {%- assign title = __404 | append: " · " | append: site.title -%}
30
25
  {%- else -%}
31
- {%- assign title = page.title | default: page.url | append: " · " | append: site.title | truncate: 110 -%}
26
+ {%- assign title = page.title | default: page.url | append: " · " | append: site.title -%}
32
27
  {%- endcase -%}
33
28
 
34
- {%- comment %} description {% endcomment -%}
35
- {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
36
-
37
- {% comment %} debug {% endcomment %}
38
- {%- if site.debug -%}
39
- {%- assign cdn = site.baseurl -%}
40
- {%- else -%}
41
- {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
42
- {%- endif -%}
43
-
44
29
  {% comment %} content {% endcomment %}
45
30
  {%- assign content = content
46
- | replace: "", "'"
47
- | replace: "“", '"'
48
- | replace: "”", '"'
49
- | replace: '<pre class="highlight"><code>', '<pre class="highlight">'
50
- | replace: '<pre><code', '<pre'
51
- | replace: "</code></pre>", "</pre>"
52
- | replace: '<code class="language-plaintext', '<code class="literal'
53
- | replace: "<dl>", '<dl class="definition">'
54
- | replace: "<table>", '<div class="wy-table-responsive"><table class="docutils">'
55
- | replace: "</table>", '</table></div>'
31
+ | replace: '', "'"
56
32
  | replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
57
33
 
34
+
58
35
  {% comment %} prev and next {% endcomment %}
59
36
  {%- assign workdir_files = site_files | where_exp: "item", "item.dir == page.dir" -%}
60
37
 
61
- {%- assign index = 0 -%}
38
+ {%- assign _index = 0 -%}
62
39
  {%- for item in workdir_files %}
63
40
  {%- if item.url == page.url %}
64
- {%- assign index = forloop.index -%}
41
+ {%- assign _index = forloop.index -%}
65
42
  {%- endif %}
66
43
  {%- endfor -%}
67
44
 
68
45
  {%- for item in workdir_files -%}
69
- {%- assign index_prev = index | minus: 1 -%}
70
- {%- assign index_next = index | plus: 1 -%}
71
- {%- if forloop.index == index_prev -%}
46
+ {%- assign _index_prev = _index | minus: 1 -%}
47
+ {%- assign _index_next = _index | plus: 1 -%}
48
+ {%- if forloop.index == _index_prev -%}
72
49
  {%- assign prev = item -%}
73
50
  {%- endif %}
74
- {%- if forloop.index == index_next -%}
51
+ {%- if forloop.index == _index_next and page.url != page.dir -%}
75
52
  {%- assign next = item -%}
76
53
  {%- endif %}
77
54
  {%- endfor -%}
78
-
79
- {% comment %} custom {% endcomment %}
80
- {%- capture custom_script -%}
81
- {%- include assets/custom.js -%}
82
- {{- site.script -}}
83
- {%- endcapture -%}
84
-
85
- {%- capture custom_scss -%}
86
- @import "theme.scss";
87
- {%- include assets/custom.scss -%}
88
- {{- site.scss -}}
89
- {%- endcapture -%}
@@ -1,3 +1,4 @@
1
+ {% comment %} Start from the language chapter(eg: en-us) or root(/) {% endcomment %}
1
2
  {%- assign workdir = include.workdir | default: "/" -%}
2
3
 
3
4
  {%- assign workdir_level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
@@ -0,0 +1,9 @@
1
+ {%- capture safe_list -%}
2
+ mermaid
3
+ note
4
+ tip
5
+ warning
6
+ danger
7
+ {%- endcapture -%}
8
+
9
+ {%- assign shortcodes = safe_list | split: " " -%}
@@ -1,6 +1,7 @@
1
1
  <div class="admonition danger">
2
- <p class="admonition-title">
3
- {{ __.note | default: "Note" }}
2
+ <p class="admonition-title" ui="danger">
3
+ <i class="fas fa-exclamation-circle"></i>
4
+ <span class="progress"></span>
4
5
  </p>
5
6
  {{ codes | markdownify | strip_newlines -}}
6
7
  </div>
@@ -1,6 +1,7 @@
1
1
  <div class="admonition note">
2
- <p class="admonition-title">
3
- {{ __.note | default: "Note" }}
2
+ <p class="admonition-title" ui="note">
3
+ <i class="fas fa-exclamation-circle"></i>
4
+ <span class="progress"></span>
4
5
  </p>
5
6
  {{ codes | markdownify | strip_newlines -}}
6
7
  </div>
@@ -1,6 +1,7 @@
1
1
  <div class="admonition tip">
2
- <p class="admonition-title">
3
- {{ __.note | default: "Note" }}
2
+ <p class="admonition-title" ui="tip">
3
+ <i class="fas fa-exclamation-circle"></i>
4
+ <span class="progress"></span>
4
5
  </p>
5
6
  {{ codes | markdownify | strip_newlines -}}
6
7
  </div>
@@ -1,6 +1,7 @@
1
1
  <div class="admonition warning">
2
- <p class="admonition-title">
3
- {{ __.note | default: "Note" }}
2
+ <p class="admonition-title" ui="warning">
3
+ <i class="fas fa-exclamation-circle"></i>
4
+ <span class="progress"></span>
4
5
  </p>
5
6
  {{ codes | markdownify | strip_newlines -}}
6
7
  </div>
@@ -7,8 +7,8 @@
7
7
  {%- capture current -%}
8
8
  {%- if page.url == item.url %}current{% endif -%}
9
9
  {%- endcapture %}
10
- <li class="toctree-l{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
11
- <a class="reference internal {{ current }}" href="{{ item.url | relative_url }}">
10
+ <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
11
+ <a class="d-flex {{ current }}" href="{{ item.url | relative_url }}">
12
12
  {%- if item.sort and site.show_sorted != false -%}
13
13
  {{ item.sort }}. {{ item.title | default: item.url }}
14
14
  {%- else -%}