Skip to content

Commit 21a20bf

Browse files
committed
fix: topics on TIL
1 parent fc90daa commit 21a20bf

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

archetypes/til.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ meta: true
77
hideDate: true
88
hideReadTime: true
99
topics:
10-
- tag
10+
- topic
1111
---

config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ theme = "hugo-tuftesque"
55
math = true
66
katex = true
77
rssLimit = 10
8+
enableGitInfo = true
89

910
[author]
1011
name = "Stephen Mwangi"

layouts/partials/content.header.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ <h1 class="content-title" data-pagefind-meta="title">
3434
{{ end }}
3535
{{ end }}
3636

37+
{{ if .Params.topics }}
38+
<br><br>
39+
<i class='fa fa-tags la-lg'></i>&nbsp;&middot;
40+
{{ range $tag := .Params.topics }}
41+
{{ with $.Site.GetPage (printf "/topics/%s" $tag) }}
42+
<a href={{ .RelPermalink }} title="{{ $tag }}"> {{$tag}}</a> &middot;
43+
{{ end }}
44+
{{ end }}
45+
{{ end }}
46+
3747
</span>
3848
{{ end }}
3949

0 commit comments

Comments
 (0)