Pages group view components together. They represent a final assemblage of those components, which means that they need to specify a layout and corresponding components (e.g. a sidebar, a navigation bar, etc).
Pages are stored in a special directory called
The URL for a Page is constructed based on the location of the page file within the directory hierarchy of the filesystem relative to
pages/ directory; e.g.
For convenience and if you mainly use static pages (in contrast to dynamic pages), you can shorten the file paths in the following way:
my-article/index.njkcan be shorten to
*.njk is an extension for Nunjucks templating engine.
Static Pages vs Dynamic Pages
A static page is a 1-to-1 relation between files on the filesystem and generated pages. A dynamic page is a single page (a template) which used to generate more than one page on the website.