list pages with robotsNoIndex in robots.txt
This commit is contained in:
parent
7e03764251
commit
724b999be4
@ -1,6 +1,12 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
|
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
|
||||||
|
{{- $noIndexPages := where .Site.Pages "Params.robotsNoIndex" true }}
|
||||||
|
{{- range $noIndexPages }}
|
||||||
|
Disallow: {{ .RelPermalink }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if not $noIndexPages }}
|
||||||
Disallow:
|
Disallow:
|
||||||
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
Disallow: /
|
Disallow: /
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user