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

Problem:

Beim Kompilieren deiner Hugo-Seite siehst du 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

Du musst deine 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üge 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 kompilierst du deine Hugo-Seite neu.


Ähnliche Beiträge nach Kategorie: Python