Posted by
ctargett on
Sep 18, 2018; 9:11pm
URL: https://discuss.asciidoctor.org/Slim-Engine-Option-asciidoc-invalid-with-custom-templates-and-Jekyll-tp6477.html
I've found the need to use custom templates so our HTML output via Jekyll is more aligned with HTML5 best practices (along the lines of
http://www.github.com/asciidoctor/asciidoctor#242), and I've been working with the html5 templates in
http://www.github.com/jirutka/asciidoctor-html5s. These are working fine, and I think we'll like the additional control in the long run.
However, our HTML build uses Jekyll and Ant, and every time I build with these templates, I get 30+ of these errors (one line for every template I've added):
Slim::Engine: Option :asciidoc is invalid
I think this is related to these sections in our _config.yml:
asciidoc: {}
asciidoctor:
safe: 0
template_dir: _templates
(etc.)
I found
http://www.github.com/asciidoctor/asciidoctor#1347, and am sort of guessing that the error is coming from the fact that the safe mode of the template engine doesn't match the safe mode of the document, and it of course cannot interpret the asciidoc section.
I need to get rid of these errors. I tried adding something like this to my _config.yml:
asciidoctor:
safe: 0
template_dir: _templates
template_engine_options:
slim:
asciidoc:
safe: unsafe
attributes:
(etc.)
But it had no effect. I also tried a few variations without the asciidoc line, as part of the later attributes section, etc., but none of them changed anything either.
Any ideas? Thanks in advance for suggestions.