From 7f0057bcd99723c190ada9577eac6f2cb53d5f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Mon, 27 Sep 2021 20:06:39 +0200 Subject: [PATCH] hidden pages: hide search index #102 if user disabled SEO or search --- layouts/partials/meta.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 729ae8da03..1d56dd9f3a 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -3,8 +3,17 @@ {{- else }} {{- range .AlternativeOutputFormats }} + {{- if ne .Name "JSON" }} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{- end }} + {{- end }} +{{- end }} +{{- if and (ne .Site.Params.disableSeoHiddenPages true) (ne .Site.Params.disableSearchHiddenPages true) }} +{{- range .AlternativeOutputFormats }} +{{- if eq .Name "JSON" }} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{- end }} +{{- end }} {{- end }} {{- with .Site.Params.author }}