align with latest Hugo. Hugo is a piece of shit!

This commit is contained in:
Junyi Hou 2024-09-11 11:57:49 +08:00
parent f53cc0573b
commit 422f416612
No known key found for this signature in database
3 changed files with 17 additions and 15 deletions

View file

@ -23,8 +23,8 @@
</article>
{{ $readNextPosts := 3}}
{{ if isset .Site.Params "readnextposts" }}
{{ $readNextPosts = .Site.Params.readNextPosts }}
{{ if site.Params.readNextPosts }}
{{ $readNextPosts = site.Params.readNextPosts }}
{{ end }}
{{ if gt $readNextPosts 0 }}
@ -56,7 +56,7 @@
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/load-mermaid.js") }}
{{ $colorTheme := "light" }}
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
{{ if and (site.Params.colortheme) (ne site.Params.colortheme "") }}
{{ $colorTheme = site.Params.colortheme | lower }}
{{ end }}