Wie man Hugo access denied behebt: "asciidoctor" is not whitelisted in policy "security.exec.allow"; the current security configuration is:

Problem:

Beim Kompilieren Ihrer Hugo-Seite sehen Sie eine Fehlermeldung wie

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:

Lösung

Sie müssen Ihre Hugo-Konfigurationsdatei bearbeiten und asciidoctor oder welches Programm auch immer den Fehler verursacht hat, zur Liste der erlaubten Programme hinzufügen.

Für TOML-Konfigurationsdateien fügen Sie den folgenden Abschnitt hinzu, der aus dem Standardwert plus asciidoctor besteht

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

Danach kompilieren Sie Ihre Hugo-Seite neu.


Check out similar posts by category: Python