As we did before, let's change the views
folder to the following new structure:
views
pages/
partials/
Remove the default
jade
files formviews
folder.Create a file called
layout.html
inside thepages
folder and place the following code:<!DOCTYPE html> <html> <head> </head> <body> {% block content %} {% endblock %} </body> </html>
Create an
index.html
inside theviews/pages
folder and place the following code:{% extends 'layout.html' %} {% block title %}{% endblock %} {% block content %} <h1>{{ title }}</h1> Welcome to {{ title }} {% endblock %}
Create an
error.html
page inside theviews/pages
folder and place the following code:{% extends 'layout.html' %} {% block title %}{% endblock %} {% block content %} <div class="container"> <h1>{{...