Layout data
Layout data concepts for Built.js themes.
When you export a Theme or Plugin, by default, the layout will be a simple header and footer with the main content between. You can see this in the exported theme/plugin's public/data/layout.json
:
The "contentIndex" with value of 1 means that the main content (all the module's sections) should be inserted at an index of 1. In the sections array above, inserting at index of 1 would put the main content between the header and the footer.
When the site is built from the theme, the components/layout/layout.js
file would look like this:
Slots
The layout file needs to include comments to represent where the imports, main content, and sections should be injected. See the example code above for how these are implemented.
Please note that Built.js themes and sites use one common layout for all pages.