Skip to content

Commit 55a25f9

Browse files
authored
added linked tags to posts and tag pages (gematik#22)
* added linked tags and tag pages * added specific version 0.2.0 for remote theme
1 parent 895c496 commit 55a25f9

File tree

8 files changed

+40
-21
lines changed

8 files changed

+40
-21
lines changed

404.html

-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
layout: default
44
---
55

6-
<style type="text/css" media="screen">
7-
.container {
8-
margin: 10px auto;
9-
max-width: 600px;
10-
text-align: center;
11-
}
12-
h1 {
13-
margin: 30px 0;
14-
font-size: 4em;
15-
line-height: 1;
16-
letter-spacing: -1px;
17-
}
18-
</style>
196

207
<div class="container">
218
<h1>404</h1>

Gemfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ gem "minima", "~> 2.5"
1515
gem "github-pages", group: :jekyll_plugins
1616
# If you have any plugins, put them here!
1717
group :jekyll_plugins do
18-
gem "jekyll-feed", "~> 0.12"
18+
gem "jekyll-feed"
19+
gem "jekyll-tagging"
1920
end
2021

2122
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

+5-1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ GEM
149149
jekyll-sitemap (1.4.0)
150150
jekyll (>= 3.7, < 5.0)
151151
jekyll-swiss (1.0.0)
152+
jekyll-tagging (1.1.0)
153+
nuggets
152154
jekyll-theme-architect (0.2.0)
153155
jekyll (> 3.5, < 5.0)
154156
jekyll-seo-tag (~> 2.0)
@@ -217,6 +219,7 @@ GEM
217219
racc (~> 1.4)
218220
nokogiri (1.13.9-x86_64-linux)
219221
racc (~> 1.4)
222+
nuggets (1.6.1)
220223
octokit (4.25.1)
221224
faraday (>= 1, < 3)
222225
sawyer (~> 0.9)
@@ -265,7 +268,8 @@ DEPENDENCIES
265268
commonmarker (>= 0.23.6)
266269
github-pages
267270
http_parser.rb (~> 0.6.0)
268-
jekyll-feed (~> 0.12)
271+
jekyll-feed
272+
jekyll-tagging
269273
minima (~> 2.5)
270274
tzinfo (~> 1.2)
271275
tzinfo-data

_config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ plugins:
4141
# set timezone
4242
timezone: Europe/Berlin
4343

44+
# Tags
45+
tag_page_layout: tag_index
46+
tag_page_dir: tag
47+
tag_permalink_style: pretty
48+
4449
# Exclude from processing.
4550
# The following items will not be processed, by default.
4651
# Any item listed under the `exclude:` key here will be automatically added to

_layouts/post.html

+12-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@
55
<small>{{ page.date | date: "%-d %B %Y" }}</small>
66
<h1>{{ page.title }}</h1>
77

8-
<p class="view">by {{ page.author | default: site.author }}, reading time: {% include read_time.html %}</p>
8+
<p class="view">by {{ page.author | default: site.author }}, reading time: {% include read_time.html %}
9+
<br />
10+
{% if page.tags != empty %}
11+
{% for tag in page.tags %}
12+
{% if tag != page.tags.last %}
13+
<em><a href="{{ site.baseurl }}{{ site.tag_page_dir | prepend: '/' }}/{{ tag | uri_escape }}">{{ tag | append: "</em> -" }}</a>
14+
{% else %}
15+
<em><a href="{{ site.baseurl }}{{ site.tag_page_dir | prepend: '/' }}/{{ tag | uri_escape }}">{{ tag | append: "</em>" }}</a>
16+
{% endif %}
17+
{% endfor %}
18+
{% endif %}
19+
</p>
920

1021
{{content}}
1122

12-
{% if page.tags %}
13-
<small>tags: <em>{{ page.tags | join: "</em> - <em>" }}</em></small>
14-
{% endif %}

_layouts/tag_index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: default
3+
---
4+
<h1>Articles tagged with {{ page.tag }} ({{ site.tags[page.tag].size }})</h1>
5+
<ul class="archive-list">
6+
{% for post in site.tags[page.tag] %}
7+
<li>
8+
<a href='{{post.url}}'>{{post.title}}</a>
9+
<time datetime='{{post.date | date: "%Y-%m-%d"}}'>{{post.date | date: "%Y-%m-%d" }}</time>
10+
</li>
11+
{% endfor %}
12+
</ul>

_plugins/ext.rb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require 'jekyll/tagging'

_posts/2022-09-30-zeroline-test-suite.markdown

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Zero-line test suite"
44
date: 2022-10-13 06:51:16 +0200
55
author: Julian Peters
66
categories: testing
7-
tags: testing test suite tiger
7+
tags: testing test-suite tiger
88
---
99

1010
Writing test suites that don't age, don't require software developers to set up, and still have significant technical depth is an impossible goal we at Gematik are constantly working towards. Zero-line test suites are a concept for minimizing required code while maximizing technical depth.
@@ -131,7 +131,8 @@ The Zero-Line test suite is a great way to hit the ground running when writing a
131131

132132
Julian Peters is a programmer at heart, writing code for 20 years. He joined gematik 9 years ago and held positions ranging from tech lead to software architect. He is the leader of the chapter on testing technologies.
133133

134+
### Linked information
134135
[^1]: <https://serenity-js.org/handbook/design/screenplay-pattern.html>
135136
[^2]: <https://cucumber.io/blog/bdd/keep-your-scenarios-brief/>
136137
[^3]: <https://github.com/gematik/app-Tiger>
137-
[^4]: <https://github.com/Arkinator/octopus>
138+
[^4]: <https://github.com/Arkinator/octopus>

0 commit comments

Comments
 (0)