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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

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

ctargett
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.
Reply | Threaded
Open this post in threaded view
|

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

mojavelinux
Administrator
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
Reply | Threaded
Open this post in threaded view
|

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

ctargett
I haven't had time to go back to this issue to continue trying to figure it out, but it definitely still exists.
Reply | Threaded
Open this post in threaded view
|

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

mojavelinux
Administrator
This seems like it has to do with asciidoctor-html5s. It's the software that is pulling in slim, and perhaps it is setting options that are not compatible with the version of slim that your project is using. I recommend filing an issue in that project. That converter should be completely self-contained, so there shouldn't be any Asciidoctor-specific configure you need to do in the Jekyll config other than load the gem.

Cheers,

-Dan

On Wed, Oct 17, 2018 at 2:37 PM ctargett [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I haven't had time to go back to this issue to continue trying to figure it out, but it definitely still exists.


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-tp6477p6533.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
Reply | Threaded
Open this post in threaded view
|

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

mojavelinux
Administrator
In reply to this post by ctargett
When you file the issue, I would also recommend sharing a stripped down project that reproduces the problem. If we do find that it's Jekyll AsciiDoc that's causing the problem, we can address it then.

Cheers,

-Dan

On Wed, Oct 17, 2018 at 3:22 PM Dan Allen <[hidden email]> wrote:
This seems like it has to do with asciidoctor-html5s. It's the software that is pulling in slim, and perhaps it is setting options that are not compatible with the version of slim that your project is using. I recommend filing an issue in that project. That converter should be completely self-contained, so there shouldn't be any Asciidoctor-specific configure you need to do in the Jekyll config other than load the gem.

Cheers,

-Dan

On Wed, Oct 17, 2018 at 2:37 PM ctargett [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I haven't had time to go back to this issue to continue trying to figure it out, but it definitely still exists.


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-tp6477p6533.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


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

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

ctargett
mojavelinux wrote
When you file the issue, I would also recommend sharing a stripped down
project that reproduces the problem. If we do find that it's Jekyll
AsciiDoc that's causing the problem, we can address it then.
Ah, good idea, I will try to do that. Thanks for the advice & for following up on the problem.
Reply | Threaded
Open this post in threaded view
|

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

ctargett
You know, your idea about an incompatibility with Slim versions made me check what happened with another version, and if I use Slim v3.0 (which asciidoctor-html5 uses), instead of 4.0.1, I don't get those errors at all. That's actual fine for us - it's the "scary" errors I don't want to introduce into our build process output, I don't think we really care which Slim version we use.

I'll still file an issue anyway warning them and other users about the problem.
Reply | Threaded
Open this post in threaded view
|

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

mojavelinux
Administrator
Thanks for following up. It's great to hear that you found a path forwarad.

It appears Slim changed something in the API that we'll have to look into. That's good to know. If you file an issue, we can be sure to track it down.

Best Regards,

-Dan

On Thu, Oct 18, 2018 at 2:50 PM ctargett [via Asciidoctor :: Discussion] <[hidden email]> wrote:
You know, your idea about an incompatibility with Slim versions made me check what happened with another version, and if I use Slim v3.0 (which asciidoctor-html5 uses), instead of 4.0.1, I don't get those errors at all. That's actual fine for us - it's the "scary" errors I don't want to introduce into our build process output, I don't think we really care which Slim version we use.

I'll still file an issue anyway warning them and other users about the problem.


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-tp6477p6537.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