How to fix Hugo access denied: "asciidoctor" is not whitelisted in policy "security.exec.allow"; the current security configuration is:
Problem:
When compiling your Hugo page, you see an error message such as
ERROR render of "section" failed: "/home/uli/klc/themes/hugo-theme-techdoc/layouts/_default/list.html:3:4": execute of template failed: template: _default/list.html:3:4: executing "main" at <.Content>: error calling Content: "/home/uli/klc/content/footprint/F2/_index.adoc:1:1": access denied: "asciidoctor" is not whitelisted in policy "security.exec.allow"; the current security configuration is:
Solution
You need to edit your Hugo configuration file and add asciidoctor
or whatever program caused the error, to the list of allowed programs to execute.
For TOML config files, add the following section which consists of the default value plus asciidoctor
[security]
[security.exec]
allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^npx$', '^postcss$', '^asciidoctor$']
After that, recompile your Hugo page.