Questions tagged [swig-template]

A fast, Django-like templating engine for node.js.

A template rendering engine for JavaScript in Node.js and Browser environments.

Features

  • Incredibly fast!
  • Available for node.js and major web browsers!
  • Extendable and customizable.
  • Express compatible.
  • Object-Oriented template inheritance.
  • Apply filters and transformations to output in your templates.
  • Automatically escapes all output.
  • Lots of iteration and conditionals supported.
172 questions
14
votes
3 answers

Escaping the double curly braces {{ }} in Swig templates for AngularJS

Swig templates and AngularJS both use the double curly brace notation. How can the double curlies be escaped in Swig for Angular?
Jack Gerson
  • 257
  • 3
  • 8
11
votes
1 answer

WebStorm syntax highlighting for Swig template engine

Given: The Swig template engine: http://paularmstrong.github.io/swig/ Webstorm has a plugin for it: Textmate bundles support A Textmate bundle for Swig is available: https://github.com/paularmstrong/Swig.tmbundle I expect I should be able to get…
7
votes
1 answer

Node.JS Consolidate and Swig

I'm trying to setup Consolidate with node(express v3.1.0), to use Swig. I keep getting the error Error: Cannot find module 'swig' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) …
Jameo
  • 4,507
  • 8
  • 40
  • 66
6
votes
1 answer

How to output JSON with swig in nodejs

I tried json filter, but I get "json" filter not found error. What I'm I doing wrong? Error: Filter "json" not found at Object.exports.wrapFilter (......./node_modules/swig/lib/helpers.js:310:11)