jekyll-theme-endless 0.16.1 → 0.16.3

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: a8505f293199d289af4cdd9ed881ab96a6730978e0eb95b6a04cfd61feddfa0d
4
- data.tar.gz: e7954ceb9243cace66957b730627042efc2c54f0f0865c27e2075f8da85d25b6
3
+ metadata.gz: ac078978f53c279579a283f74462208adec64ff42ca5523128ab30ee611b71ac
4
+ data.tar.gz: '02422009acdf667308a20943bc1674ca82001c38f86bb9baaff4b8ca6789b579'
5
5
  SHA512:
6
- metadata.gz: de69921108947990e31795bcf444651031e326ff2503699bf77c4b84334af73ca1aac17c3dda6bfc68b7afc7edf82f3aa085f07333a44d6c9b5f5b78cabf3e68
7
- data.tar.gz: 138ec6fee72b78c5814d44679a4e51abae38054dc3f3163f5e1441d97befb0b2be99ca56c56a20837dcc9c68cfa329c212d39dd16fc5e29483f40793162a2895
6
+ metadata.gz: ec24c37c4ebcc444e14e0d5c9b48eea0e630a5e6c0e19636566dbf0f3c737386faffa8880dea0dd9b6e3a2c48045075caffc03d1fbcf66919fa9ec630f4f37c3
7
+ data.tar.gz: b975a3798a412f96b81f03bad913d3a83182fc153eb90e462ad96c1f7548b1acfe100f3dc3a34ca3baed1b99bc2ffcdf88818b87780a811d76bea7318d923c74
data/_data.yml CHANGED
@@ -16,7 +16,7 @@ subtitle: "A Jekyll Theme ready for <strong><em>AsciiDoc</em></strong>"
16
16
 
17
17
  author: Sven Boekhoff
18
18
  copydate: 2020-2024
19
- disclaimer: >- # this means to ignore newlines until the next entry
19
+ disclaimer: > # folded block - single newlines are replaced with spaces.
20
20
  I'm creating this Jekyll theme because I want to use it myself.
21
21
  Therefore, many things (e.g. the support of AsciiDoc) are based on personal requirements.
22
22
  You are welcome to use the theme (at your own risk) and contribute to the development.
@@ -14,22 +14,30 @@ files for tag-pages using filenames with the unescaped tag.
14
14
  {% assign tag_dir = site.tag_dir | default: 'tags' %}
15
15
 
16
16
  {% if include.description.long %}
17
- <dt>{{ include.term | escape }}</dt>
18
- <dd>
19
- {{ include.description.long | asciidocify }}
20
- <p>
21
- Number of <a href="{{ '/' | append: tag_dir | append: '/' | append: include.term | relative_url }}">posts tagged with "{{ include.term | escape }}"</a>:
17
+ <dt>{{ include.term | escape }}</dt>
18
+ <dd>
19
+ {{ include.description.long | asciidocify }}
20
+ <p>
21
+ {% if number > 0 %}
22
+ Number of <a href="{{ '/' | append: tag_dir | append: '/' | append: include.term | relative_url }}">posts tagged with "{{ include.term | escape }}"</a>:
23
+ {% else %}
24
+ Number of posts tagged with "{{ include.term | escape }}":
25
+ {% endif %}
22
26
  <strong><em>{{ number }}</em></strong>
23
27
  </p>
24
- </dd>
28
+ </dd>
25
29
  {% elsif include.description.short %}
26
- <dt>{{ include.term | escape }}</dt>
27
- <dd>
28
- {{ include.description.short | asciidocify }}
29
- <p>
30
- Number of <a href="{{ '/' | append: tag_dir | append: '/' | append: include.term | relative_url }}">posts tagged with "{{ include.term | escape }}"</a>:
30
+ <dt>{{ include.term | escape }}</dt>
31
+ <dd>
32
+ {{ include.description.short | asciidocify }}
33
+ <p>
34
+ {% if number > 0 %}
35
+ Number of <a href="{{ '/' | append: tag_dir | append: '/' | append: include.term | relative_url }}">posts tagged with "{{ include.term | escape }}"</a>:
36
+ {% else %}
37
+ Number of posts tagged with "{{ include.term | escape }}":
38
+ {% endif %}
31
39
  <strong><em>{{ number }}</em></strong>
32
40
  </p>
33
- </dd>
41
+ </dd>
34
42
  {% endif %}
35
43
 
@@ -32,8 +32,9 @@ Call via:
32
32
  {% if tag_count > 1 %}
33
33
  {% assign additional_string = group.items | size | append: '×' %}
34
34
  {% include function_tag.html
35
- tag = group.name
36
- add = additional_string
35
+ tag=group.name
36
+ is_linked=true
37
+ add=additional_string
37
38
  %}
38
39
  {% endif %}
39
40
  {% endfor %}
@@ -3,6 +3,13 @@ Generates an unsorted list of unique tags.
3
3
  Requires an array of tags beeing provided via the parameter `tags`.
4
4
  {% endcomment %}
5
5
  {% assign tags_uniq = include.tags | uniq %}
6
+ {% assign nolink = include.not_linked %}
7
+
8
+ {% if nolink %}
9
+ {% assign linked = false %}
10
+ {% else %}
11
+ {% assign linked = true %}
12
+ {% endif %}
6
13
 
7
14
  {% assign asize = tags_uniq | size %}
8
15
  {% if asize > 0 %}
@@ -14,6 +21,7 @@ Requires an array of tags beeing provided via the parameter `tags`.
14
21
  {% for current_tag in tags_uniq %}
15
22
  {% include function_tag.html
16
23
  tag=current_tag
24
+ is_linked=linked
17
25
  %}
18
26
  {% endfor %}
19
27
  </ul>
@@ -3,22 +3,26 @@ Outputs a linked tag as a pill.
3
3
 
4
4
  Call via:
5
5
  ----
6
- <li>
7
6
  {% include function_tag.html
8
7
  tag=current_tag
8
+ is_linked=true
9
9
  add="7*"
10
10
  %}
11
- </li>
12
11
  ----
13
12
  {% endcomment %}
14
- <li class="list-inline-item mx-0 my-0">{{ include.add }}<a
15
- class="badge badge-pill badge-secondary"
16
- {% comment %}
17
- Here 'tag' Is NOT escaped, since the plugin generates
18
- files for tag-pages with filenames using the unescaped tag.
19
- {% endcomment %}
20
- {% assign tag_dir = site.tag_dir | default: 'tags' %}
21
- href="{{ '/' | append: tag_dir | append: '/' | append: include.tag | relative_url }}"
22
- >{{ include.tag | escape }}</a>
13
+ <li class="list-inline-item mx-0 my-0">{{ include.add }}
14
+ {% if include.is_linked %}
15
+ <a
16
+ class="badge badge-pill badge-secondary"
17
+ {% comment %}
18
+ Here 'tag' Is NOT escaped, since the plugin generates
19
+ files for tag-pages with filenames using the unescaped tag.
20
+ {% endcomment %}
21
+ {% assign tag_dir = site.tag_dir | default: 'tags' %}
22
+ href="{{ '/' | append: tag_dir | append: '/' | append: include.tag | relative_url }}"
23
+ >{{ include.tag | escape }}</a>
24
+ {% else %}
25
+ <span class="badge badge-pill badge-secondary">{{ include.tag | escape }}</span>
26
+ {% endif %}
23
27
  </li>
24
28
 
@@ -12,7 +12,7 @@ page.tag and page.title are set by the plugin `generate-taglist`.
12
12
  that were already escaped by the AsciiDoc processor, or, if special characters are present,
13
13
  the tags were set unescaped through the Jekyll front matter.
14
14
  {% endcomment %}
15
- Number of posts tagged with "<em>{{ page.tag | escape }}</em>": <strong>{{ site.tags[ page.tag ] | size }}</strong>
15
+ Number of posts tagged with "<em>{{ page.tag | escape }}</em>": <strong>{{ site.tags[ page.tag ] | uniq | size }}</strong>
16
16
  </p>
17
17
 
18
18
  {% if site.data.tag-description[page.tag].short %}
@@ -9,6 +9,13 @@ layout: page
9
9
  {% comment %}Create an empty array.{% endcomment %}
10
10
  {% assign posts_without_tags = "" | split:"" %}
11
11
 
12
+ {%- comment -%}
13
+ Loop through all posts in the site and **calculate tag statistics**:
14
+ - Assign the number of tags for each post to `number_of_tags`.
15
+ - If the post has tags, increment `posts_with_tags` by 1 and add the number of tags to `number_of_tags_total`.
16
+ - If the post does not have tags, add the post to the `posts_without_tags` collection.
17
+ {%- endcomment -%}
18
+
12
19
  {% for post in site.posts %}
13
20
  {% assign number_of_tags = post.tags | size %}
14
21
 
@@ -26,6 +33,12 @@ layout: page
26
33
  {% comment %}Create an empty array.{% endcomment %}
27
34
  {% assign posts_with_duplicate_tags = "" | split:"" %}
28
35
 
36
+ {%- comment -%}
37
+ Loop through all posts in the site and **check for duplicate tags**.
38
+ - For each post, calculate the number of tags (`n_tags`) and the number of unique tags (`n_unique_tags`).
39
+ - If the number of tags is not equal to the number of unique tags, it means there are duplicate tags.
40
+ - Add posts with duplicate tags to the `posts_with_duplicate_tags` collection.
41
+ {%- endcomment -%}
29
42
  {% for post in site.posts %}
30
43
  {% assign n_tags = post.tags | size %}
31
44
  {% assign n_unique_tags = post.tags | uniq | size %}
@@ -42,6 +55,13 @@ layout: page
42
55
  {% assign number_of_tags_with_description = 0 %}
43
56
  {% assign number_of_tags_without_description = 0 %}
44
57
 
58
+ {%- comment -%}
59
+ This Liquid template code iterates over all tags in the site and checks if each tag has a short description in the tag-description data file.
60
+ - Initializes an empty string `tags` and splits it into an array.
61
+ - Iterates over each tag in `site.tags`.
62
+ - If the tag has a short description, increments the `number_of_tags_with_description` counter.
63
+ - If the tag does not have a short description, increments the `number_of_tags_without_description` counter and adds the tag to the `tags_without_description` array.
64
+ {%- endcomment -%}
45
65
  {% assign tags = "" | split:"" %}
46
66
  {% for tag in site.tags %}
47
67
 
@@ -59,6 +79,25 @@ layout: page
59
79
 
60
80
 
61
81
 
82
+ {% comment %}Create an empty array.{% endcomment %}
83
+ {% assign tags_without_post = "" | split:"" %}
84
+
85
+ {%- comment -%}
86
+ Loop through all tags in the tag-description data file and add to a list all tags that do not appear in any post.
87
+ - For each tag, get the number of posts associated with it from `site.tags[tag]`.
88
+ - Add the tag and its post count to the `tags_with_post_count` collection.
89
+ {%- endcomment -%}
90
+ {% for tag in site.data.tag-description %}
91
+ {% assign tag_name = tag[0] %}
92
+ {% assign post_count = site.tags[tag_name] | size %}
93
+ {% if post_count == 0 %}
94
+ {% assign tags_without_post = tags_without_post | push: tag_name %}
95
+ {% endif %}
96
+ {% endfor %}
97
+
98
+
99
+
100
+
62
101
  <h3>Versions</h3>
63
102
  <ul>
64
103
  <li>Built with <a href ="https://jekyllrb.com">Jekyll</a> {{ jekyll.version }}.</li>
@@ -147,3 +186,20 @@ Bei Änderungen auch den entsprechenden Blog-Eintrag vom 28.10.2020 anpassen!
147
186
 
148
187
  {% endif %}
149
188
 
189
+
190
+
191
+ {% assign number_twp = tags_without_post | size %}
192
+ {% if number_twp > 0 %}
193
+ <h3>Tags without posts</h3>
194
+ <p>
195
+ <em>This can be useful for debugging purposes, as every tag from the <code>tag-description.yml</code> data file should be associated with at least one post.</em>
196
+ </p>
197
+
198
+ {% include function_tag-list.html
199
+ tags=tags_without_post
200
+ not_linked=true
201
+ %}
202
+
203
+ {% endif %}
204
+
205
+
data/_sass/glossary.scss CHANGED
@@ -38,6 +38,7 @@ div.glossary-index {
38
38
  font-family: monospace;
39
39
 
40
40
  padding: 2px 8px;
41
+ margin: 2px 0;
41
42
  border: 1px solid #d3d3d3;
42
43
  border-radius: 4px;
43
44
  display: inline-block;
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Endless
3
- VERSION = '0.16.1'
3
+ VERSION = '0.16.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-endless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.1
4
+ version: 0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Boekhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-19 00:00:00.000000000 Z
11
+ date: 2025-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll-asciidoc