Hugo access denied nasıl düzeltilir: "asciidoctor" is not whitelisted in policy "security.exec.allow"; the current security configuration is:

Sorun:

Hugo sayfanızı derlerken şöyle bir hata mesajı görürsünüz:

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:

Çözüm

Hugo yapılandırma dosyanızı düzenleyip asciidoctor‘ı veya hataya neden olan programı, çalıştırılmasına izin verilen programlar listesine eklemeniz gerekir.

TOML yapılandırma dosyaları için, varsayılan değer artı asciidoctor‘dan oluşan aşağıdaki bölümü ekleyin:

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

Bundan sonra Hugo sayfanızı yeniden derleyin.


Check out similar posts by category: Python