jekyll-rtd-theme 2.0.1 → 2.0.6

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 +45 -14
  4. data/_includes/addons/analytics.liquid +1 -1
  5. data/_includes/assets/sw.caches.js +3 -7
  6. data/_includes/class/_breadcrumbs.liquid +1 -1
  7. data/_includes/class/_toctree.liquid +2 -2
  8. data/_includes/class/content-wrap.liquid +2 -2
  9. data/_includes/class/sidebar-wrap.liquid +2 -2
  10. data/_includes/extend/list.liquid +1 -1
  11. data/_includes/extend/toctree.liquid +2 -2
  12. data/_includes/list.liquid +1 -1
  13. data/_includes/node/links.liquid +33 -0
  14. data/_includes/{head → node}/metadata.liquid +9 -1
  15. data/_includes/{head → node}/script.extension.liquid +0 -0
  16. data/_includes/{head → node}/script.liquid +6 -3
  17. data/_includes/{head → node}/script.schema.liquid +0 -0
  18. data/_includes/{head → node}/title.liquid +0 -0
  19. data/_includes/reset/content.liquid +5 -0
  20. data/_includes/reset/defaults.liquid +6 -64
  21. data/_includes/reset/description.liquid +6 -0
  22. data/_includes/reset/navigation.liquid +20 -0
  23. data/_includes/reset/title.liquid +18 -0
  24. data/_includes/reset/variables.liquid +31 -0
  25. data/_includes/reset/version.liquid +1 -0
  26. data/_includes/shortcodes/danger.liquid +3 -3
  27. data/_includes/shortcodes/mermaid.liquid +1 -1
  28. data/_includes/shortcodes/note.liquid +3 -3
  29. data/_includes/shortcodes/tip.liquid +3 -3
  30. data/_includes/shortcodes/warning.liquid +2 -2
  31. data/_layouts/default.liquid +8 -9
  32. data/_layouts/plugins/extension.liquid +1 -2
  33. data/_sass/@primer/{base → css/base}/base.scss +0 -0
  34. data/_sass/@primer/{base → css/base}/index.scss +0 -0
  35. data/_sass/@primer/{base → css/base}/kbd.scss +0 -0
  36. data/_sass/@primer/{base → css/base}/normalize.scss +0 -0
  37. data/_sass/@primer/{base → css/base}/typography-base.scss +0 -0
  38. data/_sass/@primer/{breadcrumb → css/breadcrumb}/breadcrumb.scss +0 -0
  39. data/_sass/@primer/{breadcrumb → css/breadcrumb}/index.scss +0 -0
  40. data/_sass/@primer/{buttons → css/buttons}/button-group.scss +0 -0
  41. data/_sass/@primer/{buttons → css/buttons}/button.scss +0 -0
  42. data/_sass/@primer/{buttons → css/buttons}/index.scss +0 -0
  43. data/_sass/@primer/{buttons → css/buttons}/misc.scss +0 -0
  44. data/_sass/@primer/{forms → css/forms}/form-control.scss +6 -3
  45. data/_sass/@primer/{forms → css/forms}/form-group.scss +0 -0
  46. data/_sass/@primer/{forms → css/forms}/form-select.scss +0 -0
  47. data/_sass/@primer/{forms → css/forms}/form-validation.scss +0 -0
  48. data/_sass/@primer/{forms → css/forms}/index.scss +0 -0
  49. data/_sass/@primer/{forms → css/forms}/input-group.scss +0 -0
  50. data/_sass/@primer/{forms → css/forms}/radio-group.scss +0 -0
  51. data/_sass/@primer/{loaders → css/loaders}/index.scss +0 -0
  52. data/_sass/@primer/{loaders → css/loaders}/loaders.scss +0 -0
  53. data/_sass/@primer/{markdown → css/markdown}/blob-csv.scss +0 -0
  54. data/_sass/@primer/{markdown → css/markdown}/code.scss +0 -0
  55. data/_sass/@primer/{markdown → css/markdown}/headings.scss +0 -0
  56. data/_sass/@primer/{markdown → css/markdown}/images.scss +0 -0
  57. data/_sass/@primer/{markdown → css/markdown}/index.scss +0 -0
  58. data/_sass/@primer/{markdown → css/markdown}/lists.scss +1 -0
  59. data/_sass/@primer/{markdown → css/markdown}/markdown-body.scss +0 -0
  60. data/_sass/@primer/{markdown → css/markdown}/tables.scss +0 -0
  61. data/_sass/@primer/{support → css/support}/index.scss +0 -0
  62. data/_sass/@primer/{support → css/support}/mixins/buttons.scss +0 -0
  63. data/_sass/@primer/{support → css/support}/mixins/layout.scss +0 -0
  64. data/_sass/@primer/{support → css/support}/mixins/misc.scss +0 -0
  65. data/_sass/@primer/{support → css/support}/mixins/typography.scss +0 -0
  66. data/_sass/@primer/{support → css/support}/variables/color-system.scss +0 -0
  67. data/_sass/@primer/{support → css/support}/variables/colors.scss +0 -0
  68. data/_sass/@primer/{support → css/support}/variables/layout.scss +0 -0
  69. data/_sass/@primer/{support → css/support}/variables/misc.scss +1 -0
  70. data/_sass/@primer/{support → css/support}/variables/typography.scss +0 -0
  71. data/_sass/@primer/{utilities → css/utilities}/animations.scss +0 -0
  72. data/_sass/@primer/{utilities → css/utilities}/borders.scss +6 -3
  73. data/_sass/@primer/{utilities → css/utilities}/box-shadow.scss +0 -0
  74. data/_sass/@primer/{utilities → css/utilities}/colors.scss +0 -0
  75. data/_sass/@primer/{utilities → css/utilities}/details.scss +0 -0
  76. data/_sass/@primer/{utilities → css/utilities}/flexbox.scss +3 -0
  77. data/_sass/@primer/{utilities → css/utilities}/index.scss +0 -0
  78. data/_sass/@primer/{utilities → css/utilities}/layout.scss +42 -25
  79. data/_sass/@primer/{utilities → css/utilities}/margin.scss +0 -0
  80. data/_sass/@primer/{utilities → css/utilities}/padding.scss +0 -0
  81. data/_sass/@primer/{utilities → css/utilities}/typography.scss +0 -0
  82. data/_sass/@primer/{utilities → css/utilities}/visibility-display.scss +0 -0
  83. data/_sass/_font-face.scss +7 -6
  84. data/_sass/_variables.scss +5 -1
  85. data/_sass/class/markdown-body.scss +49 -4
  86. data/_sass/class/sidebar-wrap.scss +7 -2
  87. data/_sass/class/{admonition.scss → toasts.scss} +7 -1
  88. data/_sass/font-awesome/_icons.scss +2139 -0
  89. data/_sass/font-awesome/_variables.scss +799 -0
  90. data/_sass/material-design-lite/_color-definitions.scss +378 -0
  91. data/_sass/material-design-lite/_functions.scss +19 -0
  92. data/_sass/material-design-lite/_mixins.scss +301 -0
  93. data/_sass/material-design-lite/_variables.scss +612 -0
  94. data/_sass/{class/highlight.scss → rouge/github.scss} +0 -0
  95. data/_sass/theme.scss +14 -11
  96. data/assets/css/theme.min.css +1 -1
  97. data/assets/images/apple-touch-icon-300x300.png +0 -0
  98. data/assets/images/favicon-16x16.png +0 -0
  99. data/assets/images/favicon-32x32.png +0 -0
  100. data/assets/images/favicon-96x96.png +0 -0
  101. data/assets/{favicon.liquid → images/favicon.svg} +2 -7
  102. data/assets/js/theme.js +246 -244
  103. data/assets/js/theme.min.js +1 -1
  104. data/assets/search.liquid +1 -1
  105. data/assets/sw.caches.liquid +1 -1
  106. metadata +78 -64
  107. data/_includes/head/custom.liquid +0 -17
  108. data/_includes/head/links.liquid +0 -16
  109. data/_sass/_icons.scss +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80c9c40de6bb3e14822db9443c5d715d72d02d609acf22a6ed1658670abebab2
4
- data.tar.gz: ba873a44ec2ed9ad4654d40d58426df52a89bb0d803f660636942a344ceb2c75
3
+ metadata.gz: 27952ad7046e08fda88fe995c96373c80d617b307149f8df95f25d0cede8cb16
4
+ data.tar.gz: 2edb77830307abdd39a0ea26feeaa82051042f3ff053d2fd21e28ba43e2d8a12
5
5
  SHA512:
6
- metadata.gz: 9aafffbdb975877dd09e2b8a2f3112cc4e1f1dfe26046792afbe358236d949e593fb4e0e883d46c80767d1deee5cc0f2027a2e24887d92b979dfd98a7cad4db9
7
- data.tar.gz: fa7589f2b495a4e737fceeeda7ae2f184860b0f4e0d8465d9e89268bd0f5021baa584c31abe8e5258a039ce324d2c11973ad1c8fef8b352445bffa6a904ee416
6
+ metadata.gz: 4a1fa3733360b4df42bc458dbdc59716bb84d4b3fc02f57beb534d5117467a99ba8180294bd489c6497f4aca7b030316af291210c4d81ca71231b0ad90489689
7
+ data.tar.gz: e4e09798ff5a31039a20027b947f6f59b556fb91712510061bcd501a7b94a6fc24b926f9ad22ad24cbf5d340ee77834227494ae72f08728550b7a4840887b0be
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 RunDocs
3
+ Copyright (c) 2020 RunDocs & contributors
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,9 +1,23 @@
1
1
  # jekyll-rtd-theme
2
2
 
3
- ![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg)
3
+ ![CI](https://github.com/rundocs/jekyll-rtd-theme/workflows/CI/badge.svg?branch=v2)
4
4
  ![jsDelivr](https://data.jsdelivr.com/v1/package/gh/rundocs/jekyll-rtd-theme/badge)
5
5
 
6
- Opinionated github flavored standard document theme for open source projects, with few options, just use it!
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 is inspired by [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) and refactored with:
11
+
12
+ - [github-pages](https://github.com/github/pages-gem)
13
+ - [@primer/css](https://github.com/primer/css)
14
+
15
+ Give you a native GitHub experience and solved the issue of open source project documentation site
16
+
17
+ - No need to learn other programming languages for building documentation
18
+ - No need to care about the site SEO
19
+ - Markdown syntax extended
20
+ - Native support for mermaid chart plugin
7
21
 
8
22
  ## Quick start
9
23
 
@@ -17,21 +31,16 @@ You can [generate](https://github.com/rundocs/starter-slim/generate) with the sa
17
31
 
18
32
  ```yml
19
33
  title: Your awesome title
20
- lang: en
34
+ lang: # default: en
21
35
  description: Write an awesome description for your new site here
22
36
 
23
- # plugin options
24
37
  readme_index:
25
38
  with_frontmatter: true
26
39
 
27
-
28
- # optional settings
40
+ ## optional settings ##
29
41
  meta:
30
42
  key1: value1
31
43
  key2: value2
32
- .
33
- .
34
- .
35
44
 
36
45
  google:
37
46
  gtag:
@@ -39,17 +48,39 @@ google:
39
48
 
40
49
  mermaid:
41
50
  custom: # mermaid link
42
- initialize: # mermaid options
43
-
44
-
45
- # optional plugins
51
+ initialize: # mermaid options, default: {}
52
+
53
+ # also available via file: _include/assets/custom.scss
54
+ scss:
55
+
56
+ # also available via file: _include/assets/custom.js
57
+ script:
58
+
59
+ # also available via file: _data/translate.yml
60
+ translate:
61
+ # shortcodes
62
+ danger:
63
+ note:
64
+ tip:
65
+ warning:
66
+ # 404
67
+ not_found:
68
+ # search
69
+ searching:
70
+ search:
71
+ search_docs:
72
+ search_results:
73
+ search_results_found: # the "#" in this translate will replaced with results size!
74
+ search_results_not_found:
75
+
76
+ ## optional plugins ##
46
77
  plugins:
47
78
  - jemoji
48
79
  - jekyll-avatar
49
80
  - jekyll-mentions
50
81
  ```
51
82
 
52
- ## Waiting
83
+ ## Writing
53
84
 
54
85
  Document writing specifications, please refer to [rundocs.io](https://rundocs.io) for details
55
86
 
@@ -1,7 +1,7 @@
1
1
  <dl>
2
2
  <dt>{{ __.statistics | default: "Statistics" }}</dt>
3
3
  <dd>
4
- <a href="https://github.com/rundocs/analytics" target="_blank">
4
+ <a href="https://github.com/rundocs/analytics" rel="noreferrer" target="_blank">
5
5
  {{ __.total_visits | default: "Total visits" }}:
6
6
  <span id="counter">
7
7
  <span class="AnimatedEllipsis"></span>
@@ -1,11 +1,11 @@
1
1
  self.addEventListener("activate", function (event) {
2
- let cacheWhitelist = ["rundocs-{{ version }}"];
2
+ const current = ["rundocs-{{ version }}"];
3
3
 
4
4
  event.waitUntil(
5
5
  caches.keys().then(function (keyList) {
6
6
  return Promise.all(
7
7
  keyList.map(function (key) {
8
- if (cacheWhitelist.indexOf(key) === -1) {
8
+ if (current.indexOf(key) === -1) {
9
9
  return caches.delete(key);
10
10
  }
11
11
  })
@@ -15,11 +15,7 @@ self.addEventListener("activate", function (event) {
15
15
  });
16
16
 
17
17
  self.addEventListener("fetch", function (e) {
18
- if (
19
- /^https:\/\/cdn\.jsdelivr\.net\/gh\/rundocs\/jekyll-rtd-theme@.+/.exec(
20
- e.request.url
21
- )
22
- ) {
18
+ if (e.request.url.match("rundocs/jekyll-rtd-theme@{{ version }}")) {
23
19
  e.respondWith(
24
20
  caches.match(e.request).then(function (resp) {
25
21
  if (resp !== undefined) {
@@ -27,7 +27,7 @@
27
27
  {%- endfor -%}
28
28
  {%- endcase -%}
29
29
  </ul>
30
- <a class="edit" href="{% github_edit_link %}" title="{{ __.edit | default: 'Edit on GitHub'}}" target="_blank">
30
+ <a class="edit" href="{% github_edit_link %}" title="{{ __.edit | default: 'Edit on GitHub'}}" rel="noreferrer" target="_blank">
31
31
  <i class="fa fa-edit"></i>
32
32
  </a>
33
33
  </div>
@@ -10,9 +10,9 @@
10
10
  <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
11
11
  <a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
12
12
  {%- if item.sort -%}
13
- {{ item.sort }}. {{ item.title | default: item.url }}
13
+ {{ item.sort }}. {{ item.title | default: item.name }}
14
14
  {%- else -%}
15
- {{ item.title | default: item.url }}
15
+ {{ item.title | default: item.name }}
16
16
  {%- endif -%}
17
17
  </a>
18
18
  </li>
@@ -3,8 +3,8 @@
3
3
  <button id="toggle" class="btn-octicon p-2 m-0 text-white" type="button">
4
4
  <i class="fa fa-bars"></i>
5
5
  </button>
6
- <div class="title flex-1 no-underline d-flex flex-justify-center">
7
- <a class="h4 py-1 px-2 rounded-1" href="{{ site.baseurl }}/">{{ site.title }}</a>
6
+ <div class="title flex-1 d-flex flex-justify-center">
7
+ <a class="h4 no-underline py-1 px-2 rounded-1" href="{{ site.baseurl }}/">{{ site.title }}</a>
8
8
  </div>
9
9
  </div>
10
10
  <div class="content p-3 p-sm-5">
@@ -1,8 +1,8 @@
1
1
  <div class="sidebar-wrap overflow-hidden">
2
2
  <div class="sidebar height-full overflow-y-scroll overflow-x-hidden">
3
3
  <div class="header d-flex flex-column p-3 text-center">
4
- <div class="title pb-1 no-underline">
5
- <a class="h4 py-1 px-2 rounded-1" href="{{ site.baseurl }}/" title="{{ site.description }}">
4
+ <div class="title pb-1">
5
+ <a class="h4 no-underline py-1 px-2 rounded-1" href="{{ site.baseurl }}/" title="{{ site.description }}">
6
6
  <i class="fa fa-home"></i> {{ site.title }}
7
7
  </a>
8
8
  </div>
@@ -9,7 +9,7 @@
9
9
  {% include reset/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 reset/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.name }}]({{ item.url | relative_url }})
13
13
  {%- endfor -%}
14
14
 
15
15
  {%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
@@ -25,9 +25,9 @@
25
25
  <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
26
26
  <a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
27
27
  {%- if item.sort -%}
28
- {{ item.sort }}. {{ item.title | default: item.url }}
28
+ {{ item.sort }}. {{ item.title | default: item.name }}
29
29
  {%- else -%}
30
- {{ item.title | default: item.url }}
30
+ {{ item.title | default: item.name }}
31
31
  {%- endif -%}
32
32
  </a>
33
33
  </li>
@@ -2,7 +2,7 @@
2
2
  {%- include reset/workdir.liquid workdir=page.dir -%}
3
3
 
4
4
  {%- for item in workdir_files %}
5
- - [{{ item.title | default: item.url }}]({{ item.url | relative_url }})
5
+ - [{{ item.title | default: item.name }}]({{ item.url | relative_url }})
6
6
  {%- endfor -%}
7
7
 
8
8
  {%- if include.all -%}
@@ -0,0 +1,33 @@
1
+ {%- comment %} dns-prefetch {% endcomment %}
2
+ <link rel="dns-prefetch" href="https://rundocs-analytics.glitch.me">
3
+ <link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
4
+
5
+ {%- comment %} canonical link {% endcomment %}
6
+ <link rel="canonical" href="{{ schema_surl }}">
7
+
8
+ {%- if prev -%}
9
+ <link rel="prev" href="{{ prev.url | absolute_url }}">
10
+ {%- endif -%}
11
+
12
+ {%- if next -%}
13
+ <link rel="next" href="{{ next.url | absolute_url }}">
14
+ {%- endif -%}
15
+
16
+ {% comment %} theme {% endcomment %}
17
+ <link rel="stylesheet" href="{{ cdn }}/assets/css/theme{% if site.debug.dist != false %}.min{% endif %}.css">
18
+
19
+ {%- if custom_scss.size > 0 -%}
20
+ <style>{{ custom_scss | scssify | strip_newlines }}</style>
21
+ {%- endif -%}
22
+
23
+ {% comment %} favicon icon {% endcomment %}
24
+ <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/images/favicon.svg">
25
+ {% comment %} alternate {% endcomment %}
26
+ <link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-16x16.png" sizes="16x16">
27
+ <link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-32x32.png" sizes="32x32">
28
+ <link rel="icon" type="image/png" href="{{ site.baseurl }}/assets/images/favicon-96x96.png" sizes="96x96">
29
+ {% comment %} safari {% endcomment %}
30
+ <link rel="mask-icon" href="{{ site.baseurl }}/assets/images/favicon.svg" color="#2980b9">
31
+
32
+ {% comment %} apple-touch-icon {% endcomment %}
33
+ <link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/images/apple-touch-icon-300x300.png">
@@ -10,7 +10,7 @@
10
10
  <meta name="{{ meta.first }}" content="{{ meta.last }}">
11
11
  {% endfor -%}
12
12
 
13
- {% comment %} https://ogp.me {% endcomment %}
13
+ {% comment %} Open Graph {% endcomment %}
14
14
  <meta property="og:title" content="{{ title }}">
15
15
  <meta property="og:description" content="{{ description }}">
16
16
  <meta property="og:locale" content="{{ lang }}">
@@ -19,3 +19,11 @@
19
19
  <meta property="article:author" content="{{ author }}">
20
20
  <meta property="article:published_time" content="{{ schema_date }}">
21
21
  <meta property="article:modified_time" content="{{ schema_modi }}">
22
+
23
+ {% comment %} Twitter Card {% endcomment %}
24
+ <meta name="twitter:title" content="{{ title }}">
25
+ <meta name="twitter:description" content="{{ description }}">
26
+ <meta name="twitter:card" content="summary">
27
+ <meta name="twitter:site" content="@{{ author }}">
28
+ <meta name="twitter:url" content="{{ schema_surl }}">
29
+ <meta name="twitter:creator" content="@jekyll-rtd-theme v{{ version }}">
@@ -1,11 +1,9 @@
1
1
  <script>
2
2
  window.ui = {
3
+ collect: new URL("{{ collect }}?v={{ version }}&lang={{ lang }}"),
3
4
  title: "{{ site.title }}",
4
- lang: "{{ site.lang }}",
5
- version: "{{ version }}",
6
5
  baseurl: "{{ site.baseurl }}",
7
6
  i18n: {
8
- search_docs: "{{ __.search_docs | default: 'Search Docs' }}",
9
7
  search_results: "{{ __.search_results | default: 'Search Results' }}",
10
8
  search_results_found: "{{ __.search_results_found | default: 'Search finished, found # page(s) matching the search query.' }}",
11
9
  search_results_not_found: "{{ __.search_results_not_found | default: 'Your search did not match any documents, please make sure that all characters are spelled correctly!' }}"
@@ -13,4 +11,9 @@
13
11
  };
14
12
  </script>
15
13
  <script src="{{ cdn }}/assets/js/jquery.min.js"></script>
14
+
15
+ {%- if custom_script.size > 0 -%}
16
+ <script>{{ custom_script }}</script>
17
+ {%- endif -%}
18
+
16
19
  <script src="{{ cdn }}/assets/js/theme{% if site.debug.dist != false %}.min{% endif %}.js"></script>
File without changes
@@ -0,0 +1,5 @@
1
+ {%- assign content = content
2
+ | replace: "’", "'"
3
+ | replace: "“", '"'
4
+ | replace: "”", '"'
5
+ | replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
@@ -1,69 +1,11 @@
1
1
  {%- include reset/site_pages.liquid -%}
2
2
  {%- include reset/i18n.liquid -%}
3
+ {%- include reset/version.liquid -%}
3
4
 
4
- {%- comment %} variables {% endcomment -%}
5
- {%- assign version = "2.0.1" -%}
6
- {%- assign docs = site.github -%}
7
- {%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
5
+ {%- include reset/variables.liquid -%}
8
6
 
9
- {%- assign rest_created_at = rest.created_at | default: site.time -%}
10
- {%- assign rest_updated_at = rest.updated_at | default: site.time -%}
7
+ {%- include reset/content.liquid -%}
11
8
 
12
- {%- assign lang = site.lang | default: "en" -%}
13
- {%- assign author = docs.owner.name | default: docs.owner_name -%}
14
-
15
- {%- comment %} schema {% endcomment -%}
16
- {%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
17
- {%- assign schema_modi = site.time | date_to_xmlschema -%}
18
- {%- assign schema_surl = page.url | absolute_url | xml_escape -%}
19
-
20
- {%- comment %} title {% endcomment -%}
21
- {%- case page.url -%}
22
- {%- when "/" -%}
23
- {%- assign title = site.title | append: " · " | append: site.description | truncate: 110 -%}
24
- {%- when "/search.html" -%}
25
- {%- assign title = __.search | default: "Search" | append: " · " | append: site.title | truncate: 110 -%}
26
- {%- when "/404.html" -%}
27
- {%- assign title = "404" | append: " · " | append: site.title | truncate: 110 -%}
28
- {%- else -%}
29
- {%- assign title = page.title | default: page.url | append: " · " | append: site.title | truncate: 110 -%}
30
- {%- endcase -%}
31
-
32
- {%- comment %} description {% endcomment -%}
33
- {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
34
-
35
- {% comment %} debug {% endcomment %}
36
- {%- if site.debug -%}
37
- {%- assign cdn = site.baseurl -%}
38
- {%- else -%}
39
- {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
40
- {%- endif -%}
41
-
42
- {% comment %} content {% endcomment %}
43
- {%- assign content = content
44
- | replace: '’', "'"
45
- | replace: "“", '"'
46
- | replace: '”', '"'
47
- | replace: "highlighter-rouge", "highlighter-rouge notranslate" -%}
48
-
49
-
50
- {% comment %} prev and next {% endcomment %}
51
- {%- assign workdir_files = site_files | where_exp: "item", "item.dir == page.dir" -%}
52
-
53
- {%- assign index = 0 -%}
54
- {%- for item in workdir_files %}
55
- {%- if item.url == page.url %}
56
- {%- assign index = forloop.index -%}
57
- {%- endif %}
58
- {%- endfor -%}
59
-
60
- {%- for item in workdir_files -%}
61
- {%- assign index_prev = index | minus: 1 -%}
62
- {%- assign index_next = index | plus: 1 -%}
63
- {%- if forloop.index == index_prev -%}
64
- {%- assign prev = item -%}
65
- {%- endif %}
66
- {%- if forloop.index == index_next -%}
67
- {%- assign next = item -%}
68
- {%- endif %}
69
- {%- endfor -%}
9
+ {%- include reset/navigation.liquid -%}
10
+ {%- include reset/title.liquid -%}
11
+ {%- include reset/description.liquid -%}
@@ -0,0 +1,6 @@
1
+ {%- assign description = content
2
+ | strip_html
3
+ | split: " "
4
+ | join: " "
5
+ | escape
6
+ | truncate: 150 -%}
@@ -0,0 +1,20 @@
1
+ {%- include reset/workdir.liquid workdir=page.dir -%}
2
+
3
+ {% comment %} prev and next {% endcomment %}
4
+ {%- assign index = 0 -%}
5
+ {%- for item in workdir_files %}
6
+ {%- if item.url == page.url %}
7
+ {%- assign index = forloop.index -%}
8
+ {%- endif %}
9
+ {%- endfor -%}
10
+
11
+ {%- for item in workdir_files -%}
12
+ {%- assign index_prev = index | minus: 1 -%}
13
+ {%- assign index_next = index | plus: 1 -%}
14
+ {%- if forloop.index == index_prev -%}
15
+ {%- assign prev = item -%}
16
+ {%- endif %}
17
+ {%- if forloop.index == index_next -%}
18
+ {%- assign next = item -%}
19
+ {%- endif %}
20
+ {%- endfor -%}
@@ -0,0 +1,18 @@
1
+ {%- case page.url -%}
2
+ {%- when "/" -%}
3
+ {%- assign title = site.title
4
+ | append: " · "
5
+ | append: site.description | truncate: 110 -%}
6
+ {%- when "/search.html" -%}
7
+ {%- assign title = __.search | default: "Search"
8
+ | append: " · "
9
+ | append: site.title | truncate: 110 -%}
10
+ {%- when "/404.html" -%}
11
+ {%- assign title = "404"
12
+ | append: " · "
13
+ | append: site.title | truncate: 110 -%}
14
+ {%- else -%}
15
+ {%- assign title = page.title | default: page.name
16
+ | append: " · "
17
+ | append: site.title | truncate: 110 -%}
18
+ {%- endcase -%}