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

Problème :

En compilant votre page Hugo, vous voyez un message d’erreur tel que

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:

Solution

Vous devez éditer votre fichier de configuration Hugo et ajouter asciidoctor ou tout programme ayant causé l’erreur, à la liste des programmes autorisés à exécuter.

Pour les fichiers de config TOML, ajoutez la section suivante qui consiste en la valeur par défaut plus asciidoctor

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

Après cela, recompilez votre page Hugo.


Consultez les articles similaires par catégorie : Python