diff options
author | Dillon <dillonzq@outlook.com> | 2020-05-15 19:46:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-15 19:46:51 +0300 |
commit | acef6c143ed743415c194808f3e471edbe72a307 (patch) | |
tree | c5cf5e7b796da17b695ec99aed41c42f702155fa | |
parent | 8a2bb03e5f3ca114ab03b8535f1b5993297678ba (diff) |
fix(format): string format error (#366)
-rw-r--r-- | layouts/_default/section.html | 4 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/init.html | 2 | ||||
-rw-r--r-- | layouts/partials/single/footer.html | 6 | ||||
-rw-r--r-- | layouts/posts/rss.xml | 4 | ||||
-rw-r--r-- | layouts/taxonomy/terms.html | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 9d07c92..a743ca9 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,12 +1,12 @@ {{- define "title" }} - {{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") }} - {{ .Site.Title -}} + {{- .Params.Title | default (T .Section) | default .Section | string | printf (T "allSome" | string) }} - {{ .Site.Title -}} {{- end -}} {{- define "content" -}} <div class="page archive"> {{- /* Title */ -}} <h2 class="single-title animated pulse faster"> - {{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") -}} + {{- .Params.Title | default (T .Section) | default .Section | string | printf (T "allSome" | string) -}} </h2> {{- /* Paginate */ -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 533789c..737c9b3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -12,7 +12,7 @@ {{- if ne .Site.Params.footer.hugo false -}} <div class="footer-line"> {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}} - {{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a> + {{- $hugo | string | printf (T "poweredBySome" | string) | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a> </div> {{- end -}} diff --git a/layouts/partials/init.html b/layouts/partials/init.html index c5b2825..508d74d 100644 --- a/layouts/partials/init.html +++ b/layouts/partials/init.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "0.2.8" -}} +{{- .Scratch.Set "version" "0.2.9" -}} {{- /* LoveIt theme version detection */ -}} {{- $VERSION := "0.2.X" -}} diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html index 8e28018..303d70d 100644 --- a/layouts/partials/single/footer.html +++ b/layouts/partials/single/footer.html @@ -6,7 +6,7 @@ <div class="post-info-line"> <div class="post-info-mod"> <span> - {{- printf (T "lastMod") $modify_date -}} + {{- $modify_date | string | printf (T "lastMod" | string) -}} {{- if .Site.Params.gitRepo -}} {{- with .GitInfo -}} <a class="git-hash" href="{{ printf `%s/commit/%s` $.Site.Params.gitRepo .Hash }}" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}"> @@ -17,9 +17,9 @@ </span> </div> <div class="post-info-license"> - {{- with $params.license -}} + {{- with $params.license | string -}} <span> - {{- printf (T "license") . | safeHTML -}} + {{- printf (T "license" | string) . | safeHTML -}} </span> {{- end -}} </div> diff --git a/layouts/posts/rss.xml b/layouts/posts/rss.xml index 2d3a005..67e2794 100644 --- a/layouts/posts/rss.xml +++ b/layouts/posts/rss.xml @@ -1,13 +1,13 @@ <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> <channel> <title> - {{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") }} - {{ .Site.Title -}} + {{- .Params.Title | default (T .Section) | default .Section | string | printf (T "allSome" | string) }} - {{ .Site.Title -}} </title> <link> {{- .Permalink -}} </link> <description> - {{- .Params.Title | default (T .Section) | default .Section | printf (T "allSome") }} | {{ .Site.Title -}} + {{- .Params.Title | default (T .Section) | default .Section | string | printf (T "allSome" | string) }} | {{ .Site.Title -}} </description> <generator>Hugo -- gohugo.io</generator> {{- with .Site.LanguageCode -}} diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html index 384f8b2..f53d1ae 100644 --- a/layouts/taxonomy/terms.html +++ b/layouts/taxonomy/terms.html @@ -1,5 +1,5 @@ {{- define "title" -}} - {{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | printf (T "allSome") }} - {{ .Site.Title -}} + {{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | string | printf (T "allSome" | string) }} - {{ .Site.Title -}} {{- end -}} {{- define "content" -}} @@ -10,7 +10,7 @@ <div class="page archive"> {{- /* Title */ -}} <h2 class="single-title animated pulse faster"> - {{- .Params.Title | default (T $taxonomies) | default $taxonomies | printf (T "allSome") -}} + {{- .Params.Title | default (T $taxonomies) | default $taxonomies | string | printf (T "allSome" | string) -}} </h2> {{- /* Categories Page */ -}} |