about summary refs log tree commit diff stats
path: root/layouts/_default
diff options
context:
space:
mode:
authorAlan Pearce2017-05-06 17:05:50 +0200
committerAlan Pearce2017-05-06 17:05:50 +0200
commit9c3f817c3a5af44535c85006bc145e2ed28397a9 (patch)
treea166f00925575a28a7052e66a7e3aede04a35088 /layouts/_default
parent20138bcb2ef234bb40bebaa5749b3ea4e6ce16b3 (diff)
downloadhyde-9c3f817c3a5af44535c85006bc145e2ed28397a9.tar.lz
hyde-9c3f817c3a5af44535c85006bc145e2ed28397a9.tar.zst
hyde-9c3f817c3a5af44535c85006bc145e2ed28397a9.zip
fix: Don't error on posts with no categories
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/single.html6
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>