diff --git a/wowchemy/layouts/index.json b/wowchemy/layouts/index.json index 99627fb0..f80568d2 100644 --- a/wowchemy/layouts/index.json +++ b/wowchemy/layouts/index.json @@ -52,8 +52,10 @@ {{- end -}} {{- /* Add page to index. */ -}} - {{- $index = $index | append (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "publishdate" .PublishDate "lastmod" .Lastmod.UTC.Unix "expirydate" .ExpiryDate.UTC.Unix "lang" .Lang "permalink" $permalink "relpermalink" $rel_permalink "title" $title "summary" (plainify $desc | htmlUnescape) "content" (.Plain | htmlUnescape | truncate 5000) "authors" $authors "kind" .Kind "type" .Type "section" .Section "tags" .Params.Tags "categories" .Params.Categories) -}} - + {{/* Exclude virtual pages which aren't backed by a file */}} + {{ if .File }} + {{- $index = $index | append (dict "objectID" .File.UniqueID "date" .Date.UTC.Unix "publishdate" .PublishDate "lastmod" .Lastmod.UTC.Unix "expirydate" .ExpiryDate.UTC.Unix "lang" .Lang "permalink" $permalink "relpermalink" $rel_permalink "title" $title "summary" (plainify $desc | htmlUnescape) "content" (.Plain | htmlUnescape | truncate 5000) "authors" $authors "kind" .Kind "type" .Type "section" .Section "tags" .Params.Tags "categories" .Params.Categories) -}} + {{ end }} {{- end -}} {{- end -}} diff --git a/wowchemy/layouts/partials/book_layout.html b/wowchemy/layouts/partials/book_layout.html index fe5e9d30..cfe43485 100644 --- a/wowchemy/layouts/partials/book_layout.html +++ b/wowchemy/layouts/partials/book_layout.html @@ -59,10 +59,25 @@ {{end}}
{{.Summary | plainify | emojify}}
{{end}} +