Eleventy: Template error using shortcodes

Created on 16 Dec 2018  路  3Comments  路  Source: 11ty/eleventy

I trying to use a universal shortcode with liquid templates but get this error:

Problem writing Eleventy templates: (full stack in DEBUG output)
> Having trouble rendering liquid (and markdown) template ./content/anmalan.md (TemplateContentRenderError)
> cannot eval '"Zach' as value, line:4 (RenderError)
> cannot eval '"Zach' as value (TypeError)
Copied 2 items and Processed 0 files in 0.05 seconds

I try to get it working using the example in the docs find here: https://www.11ty.io/docs/languages/liquid/#shortcodes

Using this in my md-file fails with the above error message:

{% user "Zach Leatherman" "zachleat" %}

Using this in my md-file renders without errors:

{% user "ZachLeatherman" "zachleat" %}

Looks like you can't have space in your shortcode variable.

I'm using Eleventy v0.6.0.

bug waiting-to-close

Most helpful comment

Work for this is complete and this will be included with the upcoming 0.7.0 release. Thanks for the report!

All 3 comments

Hmm, wow this is not good鈥攕orry about that. (confirmed locally)

Work for this is complete and this will be included with the upcoming 0.7.0 release. Thanks for the report!

You鈥檙e welcome. Thanks for sharing such a great SSG.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zachleat picture zachleat  路  3Comments

ndaidong picture ndaidong  路  4Comments

zellwk picture zellwk  路  3Comments

michrome picture michrome  路  3Comments

michrome picture michrome  路  3Comments