Hi,
I’m setting up a robots.txt template and it’s not going well. What’s wrong with this:
User-agent: *
{{ range where .Site.Pages "Params.bookSearchExclude" "true" }}
Disallow: {{ .RelPermalink }}
{{ end }}
One of the articles has this in the frontmatter: bookSearchExclude: true
so shouldn’t it be included ?
for now the output of robots.txt is
User-agent: *
with this exact number of lines.
Using a simple if statement works but I want to improve my syntax…