diff options
author | asurbernardo <asur@asurbernardo.com> | 2020-07-18 17:20:33 +0300 |
---|---|---|
committer | asurbernardo <asur@asurbernardo.com> | 2020-07-18 17:20:33 +0300 |
commit | d85285d6176b274d46d84e448c1078bb2aa33eae (patch) | |
tree | 482d165eb2d767e2f139effa2cce463086357302 | |
parent | 4384814acd4997e06306d658c339d8704f5a09af (diff) |
Create search index
-rw-r--r-- | layouts/index.json | 12 |
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 |