How to render HTML in Jade

Jade is a Node.js template engine that uses indentation as part of the syntax


May 15, 2021
featured image

Overview

Jade is a Node.js template engine that uses indentation as part of the syntax

By default, Jade buffers the output so we have to be explicit when we want unbuffered code

Solution

If content contains html and you want to render it, use != like this:

      
div!=content
      
    
Another example
      
p!= 'This code is' + ' not escaped!'
      
    
Reference

Photo by Pankaj Patel on Unsplash


jade html dev