Introduction - partials
Partials are common fragments of your website which are placed in separate files for easy reuse.
They are located in the partials directory of your theme.
Partial is loaded using the following syntax:
{{> header}}
The above code loads the partials/header.hbs file.
Every Publii theme uses at least 4 partials:
- header.hbs - for the beginning of every page on your website,
- footer.hbs - for the ending of every page on your website,
- menu.hbs - for the menu structure,
- pagination.hbs - for the pagination structure
The menu.hbs and pagination.hbs are optional for themes as they are defined in Publii and these default files are used if these files don't exist in the theme.
You can also define your custom partials - they should also be placed in the partials directory.