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:
-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 -}}