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

github.com/zhaohuabing/hugo-theme-cleanwhite.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhaohuabing <zhaohuabing@gmail.com>2022-03-26 05:02:15 +0300
committerzhaohuabing <zhaohuabing@gmail.com>2022-03-26 05:02:15 +0300
commit0c5cfba2e6e5f2c5b4db11bdcbf76b491e5e32c5 (patch)
treeb5212d12997d78286336c7b0953658e3b1105633
parent341d5279a203dd2e81947273b81d028015a07737 (diff)
remove hugo serve warning
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
-rw-r--r--layouts/_default/list.algolia.json2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/_default/list.algolia.json b/layouts/_default/list.algolia.json
index 963ad07..8be1f57 100644
--- a/layouts/_default/list.algolia.json
+++ b/layouts/_default/list.algolia.json
@@ -3,7 +3,9 @@
{{- $section := $.Site.GetPage "section" .Section }}
{{- range .Site.AllPages -}}
{{- if or (and (.IsDescendant $section) (and (not .Draft) (not .Params.private))) $section.IsHome -}}
+ {{- if .File -}}
{{- $.Scratch.Add "index" (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "description" .Description "dir" .File.Dir "expirydate" .ExpiryDate.UTC.Unix "fuzzywordcount" .FuzzyWordCount "keywords" .Keywords "kind" .Kind "lang" .Lang "lastmod" .Lastmod.UTC.Unix "permalink" .Permalink "publishdate" .PublishDate "readingtime" .ReadingTime "relpermalink" .RelPermalink "html" .Params.Description "title" .Title "type" .Type "url" .RelPermalink "weight" .Weight "wordcount" .WordCount "section" .Section "tags" .Params.Tags "categories" .Params.Categories "author" .Params.authors "content" .Params.Description "excerpt_html" .Params.Description "excerpt_text" .Params.Description "summary" .Summary)}}
+ {{- end -}}
{{- end -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}