From 8b725e412e5bc86b90ce43923fa0971ac3d43912 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Sat, 2 Sep 2017 22:24:30 +0100 Subject: [PATCH] Allow custom icons to be set per tag Create a file for each tag that needs a custom icon eg: /content/tags/favourites/_index.md containing: --- fa_icon: fa-heart title: Favourites --- --- layouts/_default/list.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 163cf44..0b5c15b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,11 @@ {{ define "main" }} -

{{ .Title }}

+ {{ $.Scratch.Set "fa_icon" "fa-tag" }} + + {{ if isset .Params "fa_icon" }} + {{ $.Scratch.Set "fa_icon" .Params.fa_icon }} + {{ end }} + +

{{ .Title }}

{{ range .Paginator.Pages }} {{ .Render "li" }} {{ end }}