Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(format): string format error (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored May 15, 2020
1 parent 8a2bb03 commit acef6c1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/section.html
Original file line number Diff line number Diff line change
@@ -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 */ -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/init.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "0.2.8" -}}
{{- .Scratch.Set "version" "0.2.9" -}}

{{- /* LoveIt theme version detection */ -}}
{{- $VERSION := "0.2.X" -}}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/single/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
&nbsp;<a class="git-hash" href="{{ printf `%s/commit/%s` $.Site.Params.gitRepo .Hash }}" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
Expand All @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions layouts/posts/rss.xml
Original file line number Diff line number Diff line change
@@ -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 -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/taxonomy/terms.html
Original file line number Diff line number Diff line change
@@ -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" -}}
Expand All @@ -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 */ -}}
Expand Down

0 comments on commit acef6c1

Please sign in to comment.