i18n: update i18n string format (#371)
This commit is contained in:
@@ -37,23 +37,21 @@
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
</span>
|
||||
|
||||
{{- with .Params.categories -}}
|
||||
|
||||
<span class="post-category">
|
||||
{{- T "included" -}}
|
||||
{{- range $index, $value := . -}}
|
||||
{{- if gt $index 0 }} {{ end -}}
|
||||
{{- $category := $value | anchorize | printf "/categories/%s" | $.Site.GetPage -}}
|
||||
<a href="{{ $category.RelPermalink }}">
|
||||
<i class="far fa-folder fa-fw"></i>{{ $category.Title }}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- $categories := slice -}}
|
||||
{{- range .Params.categories -}}
|
||||
{{- $category := . | anchorize | printf "/categories/%v" | $.Site.GetPage -}}
|
||||
{{- $categories = $categories | append (printf `<a href="%v"><i class="far fa-folder fa-fw"></i>%v</a>` $category.RelPermalink $category.Title) -}}
|
||||
{{- end -}}
|
||||
{{- with delimit $categories " " -}}
|
||||
<span class="post-category">
|
||||
{{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="post-meta-line">
|
||||
{{- $publish_date := .PublishDate.Format (.Site.Params.dateformat | default "2006-01-02") -}}
|
||||
<i class="far fa-calendar-alt fa-fw"></i> <time datetime={{ $publish_date }}>{{ $publish_date }}</time>
|
||||
{{- with .Site.Params.dateformat | default "2006-01-02" | .PublishDate.Format -}}
|
||||
<i class="far fa-calendar-alt fa-fw"></i> <time datetime="{{ . }}">{{ . }}</time>
|
||||
{{- end -}}
|
||||
<i class="fas fa-pencil-alt fa-fw"></i> {{ T "wordCount" .WordCount }}
|
||||
<i class="far fa-clock fa-fw"></i> {{ T "readingTime" .ReadingTime }}
|
||||
{{- $comment := .Scratch.Get "comment" | default dict -}}
|
||||
|
||||
Reference in New Issue
Block a user