diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-06-05 18:10:34 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-06-05 18:10:42 +0200 |
| commit | 7d4a696a70969b82a55715221b85700a1e68d140 (patch) | |
| tree | f80a870391737b9afa1090f3f37975e95fbd1dd2 /layouts/partials/post-class.html | |
| parent | 0c30ea398b6315e9b99afa4067a4897fad876d60 (diff) | |
| download | gohugo-theme-ed-7d4a696a70969b82a55715221b85700a1e68d140.tar.gz | |
Rework single post layouts
Diffstat (limited to 'layouts/partials/post-class.html')
| -rw-r--r-- | layouts/partials/post-class.html | 8 |
1 files changed, 8 insertions, 0 deletions
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 -}} |
