Reuse your layouts

Create a single layout used for multiple pages

In the previous step we learned to define variables in the pages that can be used by the layouts. This allows reusing the same layout for multiple pages with different content.

Create the file second-page.md in your project directory and add front matter with the layout and title variables and some markdown below:

---
layout: layout.njk
title: My second page
---
# Another page

My second page in **Lume**.

This is getting better!

Go to http://localhost:3000/second-page/ in your browser to see the new page.

The URL of the page depends on the file name of the markdown file: /second-page.md will generate the url /second-page/ path. Go to the Page files documentation to know more

This new page uses the same layout as the first page but with a different title and content.