Jak opravit Hugo access denied: "asciidoctor" is not whitelisted in policy "security.exec.allow"; the current security configuration is:

Problém:

Při kompilaci vaší Hugo stránky vidíte chybovou zprávu jako

hugo_error_output.txt
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:

Řešení

Musíte editovat váš Hugo konfigurační soubor a přidat asciidoctor nebo jakýkoliv program, který způsobil error, do seznamu povolených programů k exekuci.

Pro TOML config soubory přidejte následující sekci, která se skládá z defaultní hodnoty plus asciidoctor

hugo-config.toml
[security]
    [security.exec]
    allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^npx$', '^postcss$', '^asciidoctor$']

Poté recompile vaší Hugo stránky.


Podívejte se na podobné články podle kategorie: Python