jekyll-rtd-theme 2.0.0.pre.beta1 → 2.0.4

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +47 -14
  4. data/_includes/{class/addons → addons}/analytics.liquid +2 -2
  5. data/_includes/{class/addons → addons}/github.liquid +0 -0
  6. data/_includes/assets/custom.js +0 -0
  7. data/_includes/assets/custom.scss +0 -0
  8. data/_includes/assets/sw.caches.js +3 -7
  9. data/_includes/class/_breadcrumbs.liquid +3 -3
  10. data/_includes/class/_toctree.liquid +4 -4
  11. data/_includes/class/addons-wrap.liquid +1 -1
  12. data/_includes/class/content-wrap.liquid +3 -3
  13. data/_includes/class/sidebar-wrap.liquid +4 -4
  14. data/_includes/extend/list.liquid +15 -0
  15. data/_includes/{class/_toctree.extend.liquid → extend/toctree.liquid} +10 -6
  16. data/_includes/extra/footer.html +0 -0
  17. data/_includes/extra/head.html +0 -0
  18. data/_includes/list.liquid +4 -4
  19. data/_includes/{head → node}/links.liquid +8 -0
  20. data/_includes/{head → node}/metadata.liquid +0 -0
  21. data/_includes/{head → node}/script.extension.liquid +5 -0
  22. data/_includes/{head → node}/script.liquid +6 -3
  23. data/_includes/{head → node}/script.schema.liquid +0 -0
  24. data/_includes/{head → node}/title.liquid +0 -0
  25. data/_includes/reset/content.liquid +5 -0
  26. data/_includes/reset/defaults.liquid +11 -0
  27. data/_includes/reset/description.liquid +6 -0
  28. data/_includes/{assets → reset}/i18n.liquid +0 -0
  29. data/_includes/reset/navigation.liquid +20 -0
  30. data/_includes/{assets → reset}/site_pages.liquid +0 -0
  31. data/_includes/{assets → reset}/tabs.liquid +0 -0
  32. data/_includes/reset/title.liquid +18 -0
  33. data/_includes/reset/variables.liquid +31 -0
  34. data/_includes/reset/version.liquid +1 -0
  35. data/_includes/{assets → reset}/workdir.liquid +0 -1
  36. data/_includes/shortcodes/danger.liquid +1 -1
  37. data/_includes/shortcodes/note.liquid +1 -1
  38. data/_includes/shortcodes/tip.liquid +1 -1
  39. data/_includes/shortcodes/warning.liquid +1 -1
  40. data/_layouts/default.liquid +13 -9
  41. data/_layouts/plugins/extension.liquid +2 -3
  42. data/_sass/@primer/forms/form-control.scss +6 -3
  43. data/_sass/@primer/loaders/index.scss +2 -0
  44. data/_sass/@primer/loaders/loaders.scss +21 -0
  45. data/_sass/@primer/markdown/lists.scss +1 -0
  46. data/_sass/@primer/support/variables/misc.scss +1 -0
  47. data/_sass/@primer/utilities/borders.scss +6 -3
  48. data/_sass/@primer/utilities/flexbox.scss +3 -0
  49. data/_sass/@primer/utilities/layout.scss +42 -25
  50. data/_sass/_font-face.scss +7 -6
  51. data/_sass/_reset.scss +0 -8
  52. data/_sass/_variables.scss +1 -1
  53. data/_sass/class/markdown-body.scss +18 -7
  54. data/_sass/class/sidebar-wrap.scss +48 -36
  55. data/_sass/theme.scss +1 -0
  56. data/assets/404.liquid +1 -1
  57. data/assets/css/theme.min.css +1 -1
  58. data/assets/js/theme.js +234 -260
  59. data/assets/js/theme.min.js +1 -1
  60. data/assets/pages.liquid +1 -1
  61. data/assets/search.liquid +2 -2
  62. data/assets/sitemap.liquid +1 -1
  63. data/assets/sw.caches.liquid +1 -1
  64. metadata +33 -20
  65. data/_includes/assets/defaults.liquid +0 -69
  66. data/_includes/list.extend.liquid +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d5f271a444c19902ca9cef4a2a5861863fa6afa932326101d2a4d1a3db4b8d3
4
- data.tar.gz: 78baf17dd546c3717a466a51862545ed22f980c935bf5b40243027f7ce98b184
3
+ metadata.gz: 8d6d71f3df6935ef96991206b6a224cf0a36ccd595d83478253bf9167dcbc758
4
+ data.tar.gz: 37b55ae967ea0f8437afc6124fa73a689c18fb9efb2120a071195e5f473188cd
5
5
  SHA512:
6
- metadata.gz: aebf7861d009713ce800cb0fdef796ec33b53c743bcfbfd139a0589f3c7c46dfc15229bbd626946057a448a3bd4a1791c4f39278e7baf3749ac6d99c159281ff
7
- data.tar.gz: '09f541286274d91918604f15439f9d4faeff580cf5a798322d2be370e6f5d85e73758c936fe5c104f35cc386d60b3e71ede3f7cdc81df9f84503d1f69b88ab26'
6
+ metadata.gz: 331dca3e55068e1a8715fcaa7986c5210ff503aef4bf6279d2af43b3ddfe2f63519d4f3d1706b62155e60cf6938bc55f1a4ba8919b9cf89db5577529a69855a9
7
+ data.tar.gz: e7117f6baedc395c57fe17032f2884950859c7ee7693df0ff62c7a0da44dab706eee56916f54ac68886ef8ef8f54960672d246c1760b4ceaa1721ff3715a083a
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,11 +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 documentation 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
7
 
8
- # Waiting for your contribution 2.0
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
9
21
 
10
22
  ## Quick start
11
23
 
@@ -19,21 +31,16 @@ You can [generate](https://github.com/rundocs/starter-slim/generate) with the sa
19
31
 
20
32
  ```yml
21
33
  title: Your awesome title
22
- lang: en
34
+ lang: # default: en
23
35
  description: Write an awesome description for your new site here
24
36
 
25
- # plugin options
26
37
  readme_index:
27
38
  with_frontmatter: true
28
39
 
29
-
30
- # optional settings
40
+ ## optional settings ##
31
41
  meta:
32
42
  key1: value1
33
43
  key2: value2
34
- .
35
- .
36
- .
37
44
 
38
45
  google:
39
46
  gtag:
@@ -41,16 +48,42 @@ google:
41
48
 
42
49
  mermaid:
43
50
  custom: # mermaid link
44
- initialize: # mermaid options
45
-
46
-
47
- # 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 ##
48
77
  plugins:
49
78
  - jemoji
50
79
  - jekyll-avatar
51
80
  - jekyll-mentions
52
81
  ```
53
82
 
83
+ ## Writing
84
+
85
+ Document writing specifications, please refer to [rundocs.io](https://rundocs.io) for details
86
+
54
87
  ## The license
55
88
 
56
89
  The theme is available as open source under the terms of the MIT License
@@ -1,10 +1,10 @@
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
- <span class="progress"></span>
7
+ <span class="AnimatedEllipsis"></span>
8
8
  </span>
9
9
  </a>
10
10
  </dd>
File without changes
File without changes
@@ -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) {
@@ -1,7 +1,7 @@
1
1
  <div class="navigation-top d-flex flex-justify-between">
2
2
  <ul class="breadcrumb" role="navigation" aria-label="breadcrumbs navigation">
3
3
  <li class="breadcrumb-item">
4
- <a href="{{ site.baseurl }}/">
4
+ <a class="no-underline" href="{{ site.baseurl }}/">
5
5
  <i class="fa fa-home"></i>
6
6
  </a>
7
7
  </li>
@@ -17,7 +17,7 @@
17
17
  {%- else -%}
18
18
  {%- assign blocks = page.path | split: "/" -%}
19
19
  {%- for block in blocks -%}
20
- <li class="breadcrumb-item" {% if forloop.last %}aria-current{% endif %}>
20
+ <li class="breadcrumb-item" {% if forloop.last %}aria-current="page"{% endif %}>
21
21
  {%- if forloop.last -%}
22
22
  {{ page.name }}
23
23
  {%- else -%}
@@ -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>
@@ -1,4 +1,4 @@
1
- {%- include assets/workdir.liquid %}
1
+ {%- include reset/workdir.liquid %}
2
2
 
3
3
  {% comment %} list the root files {% endcomment %}
4
4
  <ul>
@@ -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>
@@ -20,4 +20,4 @@
20
20
  </ul>
21
21
 
22
22
  {% comment %} list the root dirs {% endcomment %}
23
- {%- for workdir in workdir_dirs %}{% include class/_toctree.extend.liquid %}{% endfor -%}
23
+ {%- for workdir in workdir_dirs %}{% include extend/toctree.liquid %}{% endfor -%}
@@ -13,7 +13,7 @@
13
13
  <div class="addons d-flex flex-column height-full p-2 d-none">
14
14
  {%- assign items = "github, analytics" | split: ", " -%}
15
15
  {% for item in items -%}
16
- {% include class/addons/{{ item }}.liquid %}
16
+ {% include addons/{{ item }}.liquid %}
17
17
  {% endfor -%}
18
18
  <hr>
19
19
  <div class="generator f6 pb-2">
@@ -3,11 +3,11 @@
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
- <div class="content p-5">
10
+ <div class="content p-3 p-sm-5">
11
11
  {% include class/_breadcrumbs.liquid %}
12
12
  <hr>
13
13
  <div role="main" itemscope="itemscope" itemtype="http://schema.org/Article">
@@ -1,12 +1,12 @@
1
1
  <div class="sidebar-wrap overflow-hidden">
2
- <div class="sidebar d-flex flex-column height-full overflow-y-scroll overflow-x-hidden">
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
- <span class="version text-gray">{{ docs.latest_release.name }}</span>
9
+ <span class="version">{{ docs.latest_release.name }}</span>
10
10
  <form class="search pt-2" action="{{ site.baseurl }}/search.html" method="get" autocomplete="off">
11
11
  <input class="form-control input-block input-sm" type="text" name="q" placeholder="{{ __.search_docs | default: 'Search docs...' }}">
12
12
  </form>
@@ -0,0 +1,15 @@
1
+ {%- include reset/site_pages.liquid -%}
2
+ {%- include reset/workdir.liquid -%}
3
+
4
+ {%- assign base = page.dir | append: "temp/" | split: "/" | size -%}
5
+ {%- assign size = workdir_level | minus: base -%}
6
+ {%- assign size_p1 = size | plus: 1 -%}
7
+
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 }})
10
+
11
+ {%- for item in workdir_files %}
12
+ {% include reset/tabs.liquid size=size_p1 %}- [{{ item.title | default: item.name }}]({{ item.url | relative_url }})
13
+ {%- endfor -%}
14
+
15
+ {%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
@@ -1,13 +1,17 @@
1
- {%- include assets/workdir.liquid %}
1
+ {%- include reset/workdir.liquid %}
2
2
 
3
3
  {% comment %} display the directory name {% endcomment %}
4
4
  {%- assign dir = site_pages | where: "url", workdir | first -%}
5
5
 
6
6
  {%- if workdir_level == 2 %}
7
7
  {% comment %} display the root sub-directory as "p.caption" {% endcomment %}
8
- <p class="caption text-uppercase no-wrap px-2 mb-0">{{ dir.title | default: dir.url }}</p>
8
+ <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="{{ dir.url | relative_url }}">
9
+ {{ dir.title | default: dir.url }}
10
+ </a>
9
11
  {%- else %}
10
- <a class="d-flex flex-items-baseline" href="{{ dir.url | relative_url }}">{{ dir.title | default: dir.url }}</a>
12
+ <a class="d-flex flex-items-baseline" href="{{ dir.url | relative_url }}">
13
+ {{ dir.title | default: dir.url }}
14
+ </a>
11
15
  {%- endif -%}
12
16
 
13
17
  <ul>
@@ -21,9 +25,9 @@
21
25
  <li class="toc level-{{ level }} {{ current }}" data-sort="{{ item.sort }}" data-level="{{ level }}">
22
26
  <a class="d-flex flex-items-baseline {{ current }}" href="{{ item.url | relative_url }}">
23
27
  {%- if item.sort -%}
24
- {{ item.sort }}. {{ item.title | default: item.url }}
28
+ {{ item.sort }}. {{ item.title | default: item.name }}
25
29
  {%- else -%}
26
- {{ item.title | default: item.url }}
30
+ {{ item.title | default: item.name }}
27
31
  {%- endif -%}
28
32
  </a>
29
33
  </li>
@@ -32,6 +36,6 @@
32
36
  {% comment %} list dirs {% endcomment %}
33
37
  {%- for workdir in workdir_dirs -%}
34
38
  {%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
35
- <li class="toc level-{{ level }}">{% include class/_toctree.extend.liquid %}</li>
39
+ <li class="toc level-{{ level }}">{% include extend/toctree.liquid %}</li>
36
40
  {%- endfor -%}
37
41
  </ul>
File without changes
File without changes
@@ -1,10 +1,10 @@
1
- {%- include assets/site_pages.liquid -%}
2
- {%- include assets/workdir.liquid workdir=page.dir -%}
1
+ {%- include reset/site_pages.liquid -%}
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 -%}
9
- {%- for workdir in workdir_dirs %}{% include list.extend.liquid %}{% endfor -%}
9
+ {%- for workdir in workdir_dirs %}{% include extend/list.liquid %}{% endfor -%}
10
10
  {%- endif -%}
@@ -1,3 +1,7 @@
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
+
1
5
  {%- comment %} canonical link {% endcomment %}
2
6
  <link rel="canonical" href="{{ schema_surl }}">
3
7
 
@@ -12,5 +16,9 @@
12
16
  {% comment %} theme {% endcomment %}
13
17
  <link rel="stylesheet" href="{{ cdn }}/assets/css/theme{% if site.debug.dist != false %}.min{% endif %}.css">
14
18
 
19
+ {%- if custom_scss.size > 0 -%}
20
+ <style>{{ custom_scss | scssify | strip_newlines }}</style>
21
+ {%- endif -%}
22
+
15
23
  {% comment %} icon {% endcomment %}
16
24
  <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/favicon.svg">
File without changes
@@ -22,3 +22,8 @@
22
22
  gtag("config", "{{ site.google.gtag }}");
23
23
  </script>
24
24
  {%- endif -%}
25
+
26
+ {% comment %} Google AdSense {% endcomment %}
27
+ {%- if site.google.adsense -%}
28
+ <script data-ad-client="{{ site.google.adsense }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
29
+ {%- endif -%}
@@ -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" -%}
@@ -0,0 +1,11 @@
1
+ {%- include reset/site_pages.liquid -%}
2
+ {%- include reset/i18n.liquid -%}
3
+ {%- include reset/version.liquid -%}
4
+
5
+ {%- include reset/variables.liquid -%}
6
+
7
+ {%- include reset/content.liquid -%}
8
+
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 -%}
File without changes
@@ -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 -%}