In this section, we will go through the ways Jade views can be modularized at file and code level.
markdown Node module, you can include Markdown files too.
To include a file in a view, use the
include directive and pass it the path of the file to be included. It is very important to give the correct extension to the include files, because Jade uses the extension of the file to render the content accordingly.
A Jade view file and its included Jade files share the same scope. So variables defined in one file are available to the other.
The indented hierarchy is applicable to the
include directive too, so the ...