🔧 Add algolia search indexes content.

This commit is contained in:
凡梦星尘
2022-08-01 17:14:22 +08:00
parent 34faa6f6f3
commit ac844e4e8c
3 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
[
{{- range $index, $entry := where .Site.RegularPages "Kind" "page" }}
{{- if $index }}, {{ end }}
{
"permalink": "{{ .Permalink | relURL }}",
"title": {{ .Title | jsonify }},
"content": {{ replace .Plain | jsonify }},
"date": {{ .Date.Format $.Site.Params.timeFormat | jsonify }},
"updated": {{ .Lastmod.Format $.Site.Params.timeFormat | jsonify }}
}
{{- end }}
]