Top "Pug" questions

Pug (formerly known as Jade) is a robust, elegant and feature-rich template engine for Node.

Get both the key and the index using Jade iteration

As described here: http://jade-lang.com/reference/, it is easy enough to either get the index or the key. But …

html templates loops iteration pug
Using Jade templates in Backbone.js

I love the HAML-like syntax of Jade's templating engine in Node.js, and I would love to use it client-side …

javascript backbone.js pug underscore.js
Access current request in Express/Jade view

I have a layout Jade view that has a menu via unordered list, and I want to set the <…

node.js express pug
Jade - missing space before text for line x of jade file

I'm making an Express based web application and everytime someone visits this jade file i get the following error: Warning: …

pug
Multiple Lines for Long Attribute Value in Jade / Pug

How do we write a long attribute value over multiple lines in Jade / Pug? SVG paths tend to be really …

pug
Add a whitespace at the end of the line in Jade

I have this jade code: p | Avatar hosted by a(href='http://www.gravatar.com/', target='_blank') Gravatar …

node.js express pug
Block comments in Pug (Jade)?

How do you block comment out code in the Pug templating engine? I know how to comment out a line: //…

pug
assigning value to a variable inside a jade file

Is it possible to assign variables inside a jade file, in order to make the code more readable? Specifically, I …

pug
How do I generate JSON with ExpressJS/RailwayJS (Node.JS)

I was exploring developing in Node.JS and found ExpressJS and RailwayJS (based on Express) which are frameworks for Node. …

node.js express pug ejs railway.js
jade template engine (under node.js): multi-line block without pipe symbol

I'm currently using Jade on a new project. It seems well-suited to composing webapp layouts, but not for writing static …

node.js block pug