Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-05-18 11:10:24 +0300
committerGitHub <noreply@github.com>2020-05-18 11:10:24 +0300
commit9c1244490f0f5596db9b6df933041af9c727dc5b (patch)
tree57c4af8cb68299ba371738b7946a22fb15d97d33 /layouts/index.json
parent36f59a72ee4c186cc525b67da6813498f43a711c (diff)
i18n: update i18n string format (#371)
Diffstat (limited to 'layouts/index.json')
-rw-r--r--layouts/index.json8
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/index.json b/layouts/index.json
index c85af1f..c78a51f 100644
--- a/layouts/index.json
+++ b/layouts/index.json
@@ -12,7 +12,7 @@
{{- $uri = .Permalink -}}
{{- end -}}
{{- $meta := dict "uri" $uri "title" .Title "tags" .Params.tags "categories" .Params.categories -}}
- {{- $meta = .PublishDate.Format ($.Site.Params.dateFormat | default "2006-01-02") | dict "date" | merge $meta -}}
+ {{- $meta = $.Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format | dict "date" | merge $meta -}}
{{- with .Description -}}
{{- $index = $index | append (dict "content" . "objectID" $uri | merge $meta) -}}
{{- end -}}
@@ -23,11 +23,11 @@
{{- $content = $content | replaceRE `<span class="lnt?"> *\d*\n?</span>` "" -}}
{{- range $i, $contenti := split $content "<h2 id=" -}}
{{- if gt $i 0 -}}
- {{- $contenti = printf "<h2 id=%s" $contenti -}}
+ {{- $contenti = printf "<h2 id=%v" $contenti -}}
{{- end -}}
{{- range $j, $contentj := split $contenti "<h3 id=" -}}
{{- if gt $j 0 -}}
- {{- $contentj = printf "<h3 id=%s" $contentj -}}
+ {{- $contentj = printf "<h3 id=%v" $contentj -}}
{{- end -}}
{{/* Plainify, unescape and remove (\n, \t) */}}
{{- $contentj = $contentj | plainify | htmlUnescape | replaceRE `[\n\t ]+` " " -}}
@@ -35,7 +35,7 @@
{{- $contentj = substr $contentj 0 $.Site.Params.search.contentLength -}}
{{- end -}}
{{- if $contentj | and (ne $contentj " ") -}}
- {{- $one := printf "%s:%d:%d" $uri $i $j | dict "content" $contentj "objectID" | merge $meta -}}
+ {{- $one := printf "%v:%v:%v" $uri $i $j | dict "content" $contentj "objectID" | merge $meta -}}
{{- $index = $index | append $one -}}
{{- end -}}
{{- end -}}