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

github.com/asurbernardo/amperage.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasurbernardo <asur@asurbernardo.com>2020-07-18 17:20:33 +0300
committerasurbernardo <asur@asurbernardo.com>2020-07-18 17:20:33 +0300
commitd85285d6176b274d46d84e448c1078bb2aa33eae (patch)
tree482d165eb2d767e2f139effa2cce463086357302
parent4384814acd4997e06306d658c339d8704f5a09af (diff)
Create search index
-rw-r--r--layouts/index.json12
1 files changed, 12 insertions, 0 deletions
diff --git a/layouts/index.json b/layouts/index.json
new file mode 100644
index 0000000..2364d42
--- /dev/null
+++ b/layouts/index.json
@@ -0,0 +1,12 @@
+[
+ {{- range $index, $page :=.Site.RegularPages -}}
+ {{- $months := index .Site.Data (i18n "months") -}}
+ {{- $month := index $months (printf "%d" .PublishDate.Month) -}}
+ {{- if ne $index 0 -}},{{- end -}}
+ {
+ 'title': '{{ .Title }}',
+ 'link': '{{ .Permalink }}',
+ 'date': '{{ i18n "published" (dict "Day" .PublishDate.Day "Month" $month "Year" .PublishDate.Year) }}'
+ }
+ {{- end -}}
+] \ No newline at end of file