hugo-theme-next/layouts/_default/list.algoliaindexes.json
2023-01-01 21:12:58 +08:00

13 lines
429 B
JSON

[
{{ range $index, $entry := where .Site.RegularPages "Kind" "page" }}
{{ if $index }}, {{ end }}
{
"objectID": "{{ .Date.Unix }}",
"permalink": "{{ .Permalink | relURL }}",
"title": {{ .Title | jsonify }},
"content": {{ .Plain | jsonify | safeJS }},
"date": {{ .Date.Format $.Site.Params.timeFormat | jsonify }},
"updated": {{ .Lastmod.Format $.Site.Params.timeFormat | jsonify }}
}
{{ end }}
]