add robots.txt disallow directive for hiddenPage

This commit is contained in:
Aniket Teredesai 2023-02-20 22:42:27 +05:30
parent 77ff4f99c6
commit 149067a8a2

View File

@ -1,7 +1,9 @@
User-agent: *
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
Disallow:
{{- else }}
{{- if not (hugo.IsProduction | or (eq site.Params.env "production")) }}
Disallow: /
{{- else }}
{{- range where site.RegularPages "Params.hiddenPage" true }}
Disallow: {{ .RelPermalink }}
{{- end }}
{{- end }}
Sitemap: {{ "sitemap.xml" | absURL }}