aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Nájera <hello@oscarnajera.com>2018-07-15 22:54:00 +0200
committerÓscar Nájera <hello@oscarnajera.com>2018-07-15 22:54:00 +0200
commitb3291eba545b8a90c39b201075441e0717b4d18b (patch)
tree5aa9643a050936ae44366f777ed3c28e2239b830
parentc7ec14c266e443ea7c455ca9a3dd10ba743c4752 (diff)
downloadhugo-minimalist-theme-b3291eba545b8a90c39b201075441e0717b4d18b.tar.gz
hugo-minimalist-theme-b3291eba545b8a90c39b201075441e0717b4d18b.tar.bz2
hugo-minimalist-theme-b3291eba545b8a90c39b201075441e0717b4d18b.zip
skip noindex pages for json content
-rw-r--r--layouts/index.json2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/index.json b/layouts/index.json
index c93f805..b8559e7 100644
--- a/layouts/index.json
+++ b/layouts/index.json
@@ -1,5 +1,7 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
+{{- if ne .Params.noindex true -}}
{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}}
{{- end -}}
+{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}