mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-18 00:14:35 +00:00
refactor(hugo): use strings.ReplacePairs for chained replacements
Adopt Hugo v0.158's strings.ReplacePairs in rss.xml and parse_block_v3.html to replace nested replace calls.
This commit is contained in:
1 parent
815d25ca9d
commit
13dde12ae0
2 files changed
+2
-2
No files matched your search
@@ -17,7 +17,7 @@
|
||||
<description>{{ .Title | default site.Title }}</description>
|
||||
<generator>HugoBlox Kit (https://hugoblox.com)</generator>
|
||||
{{- with site.Language.Locale }}<language>{{.}}</language>{{end -}}
|
||||
{{- with site.Copyright }}<copyright>{{ replace (replace . "{year}" now.Year) "©" "©" | plainify }}</copyright>{{end -}}
|
||||
{{- with site.Copyright }}<copyright>{{ strings.ReplacePairs . "{year}" now.Year "©" "©" | plainify }}</copyright>{{end -}}
|
||||
{{- if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end -}}
|
||||
{{- if .Scratch.Get "og_image" }}
|
||||
<image>
|
||||
|
||||
Reference in new issue
Block a user