I'm using jade/pug template engine with ExpressJS on Node.js. It outputs a html with single line. No indentation at all. I couldn't find any beautifier option.
Click on the URL button, Enter URL and Submit. This tool supports loading the HTML File to transform to PUG. Click on the Upload button and select File. HTML to PUG Converter Online works well on Windows, MAC, Linux, Chrome, Firefox, Edge, and Safari.
The general rendering process of Pug is simple. pug. compile() will compile the Pug source code into a JavaScript function that takes a data object (called “ locals ”) as an argument. Call that resultant function with your data, and voilà!, it will return a string of HTML rendered with your data.
In app.js, pass the pretty
option to the Jade compiler.
app.set('view options', { pretty: true });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With