aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/templates.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/templates.go')
-rw-r--r--internal/web/templates.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/web/templates.go b/internal/web/templates.go
index c2f9847..ea39a6d 100644
--- a/internal/web/templates.go
+++ b/internal/web/templates.go
@@ -116,6 +116,13 @@ var funcs = template.FuncMap{
"filemd": fileMarkdown,
"add": func(a, b int) int { return a + b },
"sub": func(a, b int) int { return a - b },
+ // tagname is a tag as the theme lists it: with a # in front when TagHash is on
+ "tagname": func(t Theme, name string) string {
+ if t.TagHash {
+ return "#" + name
+ }
+ return name
+ },
"deref": func(p *string) string {
if p == nil {
return ""