From 7d4a696a70969b82a55715221b85700a1e68d140 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 5 Jun 2022 18:10:34 +0200 Subject: Rework single post layouts --- layouts/partials/post-class.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 layouts/partials/post-class.html (limited to 'layouts/partials/post-class.html') diff --git a/layouts/partials/post-class.html b/layouts/partials/post-class.html new file mode 100644 index 0000000..1d32a8a --- /dev/null +++ b/layouts/partials/post-class.html @@ -0,0 +1,8 @@ +{{- $postClass := "page" -}} +{{- if .IsPage -}} + {{- $postClass = .Type | lower | singularize -}} + {{- if eq $postClass "poem" -}} + {{- $postClass = "poem poetry" -}} + {{- end -}} +{{- end -}} +{{- $postClass -}} -- cgit v1.2.3