diff options
author | Alan Pearce | 2017-05-06 17:05:50 +0200 |
---|---|---|
committer | Alan Pearce | 2017-05-06 17:05:50 +0200 |
commit | 9c3f817c3a5af44535c85006bc145e2ed28397a9 (patch) | |
tree | a166f00925575a28a7052e66a7e3aede04a35088 /layouts | |
parent | 20138bcb2ef234bb40bebaa5749b3ea4e6ce16b3 (diff) | |
download | hyde-9c3f817c3a5af44535c85006bc145e2ed28397a9.tar.lz hyde-9c3f817c3a5af44535c85006bc145e2ed28397a9.tar.zst hyde-9c3f817c3a5af44535c85006bc145e2ed28397a9.zip |
fix: Don't error on posts with no categories
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 38251ee..5bd829f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,12 +10,15 @@ {{ .Content }} </main> <footer class="footer"> + {{ if .Params.categories }} <span> Category: - {{ range first 1 .Params.categories }} + {{ range .Params.categories }} <a class="p-category" href="/categories/{{ . | lower | urlize }}/">{{ . }}</a> {{ end }} </span> + {{ end }} + {{ if .Params.tags }} <p> Tags: {{ range .Params.tags }} @@ -25,6 +28,7 @@ {{ end }} </p> + {{ end }} </footer> </article> </main> |