Login  Register

Re: Slim::Engine: Option :asciidoc invalid with custom templates and Jekyll

Posted by mojavelinux on Oct 09, 2018; 2:19am
URL: https://discuss.asciidoctor.org/Slim-Engine-Option-asciidoc-invalid-with-custom-templates-and-Jekyll-tp6477p6504.html

Is issue still outstanding, or have you gotten to the bottom of it? I can't remember where we left off.

Cheers,

-Dan

On Tue, Sep 18, 2018 at 3:11 PM ctargett [via Asciidoctor :: Discussion] <[hidden email]> wrote:
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.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Slim-Engine-Option-asciidoc-invalid-with-custom-templates-and-Jekyll-tp6477.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux