A conditional load for the pages /faq/ and /de/faq/. Nothing found in the docs onfortunately.
The shortcode etc. runs totally fine the way I wanted. However, I load jquery from the baseof.html, so it’s on all webpages. (I am aware that I can manage to hardcode two pages after build)
In baseof.html wrap the jQuery script in a condition.
For example
{{ if in .RelPermalink "faq" }}
<--- jQuery script --->
{{ end }}
Alternatively you can set a front matter parameter in the content files whose output is meant to include jQuery.
eg.
jquery = true
And then in baseof.html use one of the following conditions:
{{ with .Params.jquery }} {{/* checks if the parameter exists */}}
OR
{{ if eq .Params.jquery true }} {{/* checks if the boolean value of the parameter is set to true */}}
<--- jQuery script --->
{{ end }}
Thank you! I went for the IMHO safer “front matter” method and it works perfectly, with one tiny change: for me I guess it should be jquery: true
I will use that method probably quite a lot.
This said, the docs are quite cryptic and hard to understand. They don’t look always complete to me and they certainly lack hugo examples. I quite like how php.net has their reference command pages, a command, some references, then some examples - and after that user examples.