The Layout
Static >> The LayoutA layout consists of an outer wrapper, default files for the ‘header’ and main navigation, a file to generate the for each page and one as well for the . Stylesheets, resources, scripts, and site-wide partials can also be made available.
When the blueprint is built the structure folder is made into base, where the default.rbml and all site-wide partials live. The layout is not consulted in any part of the site-generation process except when building the blueprint and contents.
Structure of a Layout
- main_navigation
- Evaluated by erb and added to structure when building the blueprint. By convention this file holds the main navigation for each page.
- page_head
- Evaluated by erb and added to structure when building the blueprint. By convention this file holds the major constant or branding portion of a page, such as the header. In the default layout page head incorporates the main_navigation.
- contents
- Becomes the basis for each page’s content blueprint to define the structure for the major changing area in the page.
- submenu
- This file is evaluated by erb and added to the blueprint if a page has sub-items. In the default layout the submenu is added in the contents if the page has one.