Як виправити Hugo access denied: "asciidoctor" is not whitelisted in policy "security.exec.allow"; the current security configuration is:

Проблема:

Під час компіляції вашої сторінки Hugo ви бачите таке повідомлення про помилку:

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:

Рішення

Вам потрібно відредагувати файл конфігурації Hugo і додати asciidoctor або іншу програму, яка викликала помилку, до списку дозволених програм для виконання.

Для файлів конфігурації TOML додайте наступний розділ, який складається зі значення за замовчуванням плюс asciidoctor:

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

Після цього перекомпілюйте вашу сторінку Hugo.


Дивіться схожі статті за категоріями: Python