GitHub

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:

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.

Subscribe

Get the latest Publii news, updates and more delivered directly to your email inbox

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at contact@tidycustoms.net. By clicking below, you agree that we may process your information in accordance with our Privacy Policy.