Top "Nunjucks" questions

A rich and powerful templating language for JavaScript

Convert integer to string Jinja

I have an integer {% set curYear = 2013 %} In {% if %} statement I have to compare it with some string. I can't set …

python jinja2 nunjucks
if... !true conditional rendering in nunjucks

if...true conditionals work like a charm as outlined here in the docs. but if I try to do something …

templates nunjucks
Nunjucks: 'if' with multiple 'and' or 'or' condition

Today my team mate was struggling on how to add multiple conditions with 'and' or 'or' in an if statement …

node.js templates npm template-engine nunjucks
Loop through object properties nunjucks

I've got following model: items: { someId1: { property1.... }, someId2: {...}, someIdN: {...} } I would like to get a for-loop in my template (nunjucks) …

nunjucks
Loop by integer value with Nunjucks Templating

I'm quite new to nunjucks and from what I have read this is not possible, but I was wondering if …

javascript node.js templating nunjucks
How can I define global variables in nunjucks?

Using nunjucks, how can I define some global variables that should always be available within all templates? Ideally, they would …

node.js nunjucks
Stop nunjucks from escaping HTML

I have a comments AJAX call which returns data of the posted comment, I also have @mention functionality built in, …

javascript template-engine nunjucks
Using Nunjucks with Express 4

I am trying to use Nunjucks as a template engine from Express. I did this: var express = require('express'); var …

node.js express nunjucks
How can I pass JSON data into a Nunjucks template?

I want to use Nunjucks templates but want to pass in my own JSON data to be used on the …

jinja2 nunjucks
nunjucks: Template not found

Trying to render a nunjucks template but getting Error: template not found: email.html. server/ views/ email/ email.html workers/ …

node.js nunjucks