I don’t like the Pug very much but for today I will write a simple intro tutorial.
The Pug is a template engine for Node and for the browser which can make you more productive and your code more readable.
It compiles to HTML and has a simplified syntax with more advanced features by building a simple Node/Express.
You can convert the pug to HTML and back with this tool: pug HTML online tool
Once Node and npm are installed on your system, you can install the pug-cli:
$ npm i -g pug-cli
$ pug --version
If you want to test it you can use Codepen online tool with these settings: select Settings -> HTML and choose Pug as your preprocessor.
Unescaped buffered code can be dangerous. You must be sure to sanitize any user inputs to avoid cross-site scripting (XSS).
You can see some simple example on my Codepen account: