-
Notifications
You must be signed in to change notification settings - Fork 446
-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: jinja shortcode tmpl? (seems to only work using mako) #2528
Comments
I now notice that the handbook only talks about mako. Bums me out that jinja2 used to be supported too (as I have experience with jinja2 but mako is new to me... seems similar enough that it won't be hard to get my head around, but I'm using jinja2 for other templating on the same site already). |
On Tue, Oct 11, 2016 at 08:36:05PM -0700, Fuzzwah wrote:
Jinja2 templates are still supported. Theming documentation still mentions Chris Warrick https://chriswarrick.com/ |
The shortcodes template exmaple shows using jinja2 in the template file:
https://getnikola.com/extending.html#template-based-shortcodes
I have created a file
shortcodes/image.tmpl
and am trying to use the shortcode in an .rts file:{{% image src=https://farm1.staticflickr.com/138/352972944_4f9d568680.jpg %}}
However I can't get jinja2 templates to work. Example:
<img class="img-responsive img-thumbnail img-rounded" style="margin-bottom: 10px" src="{{src}}">
However it works fine if I use mako style templating:
<img class="img-responsive img-thumbnail img-rounded" style="margin-bottom: 10px" src="${src}">
Is there something that I'm missing?
The text was updated successfully, but these errors were encountered: