Home

Site Layout Config

Site layout configuration

Controls the layout structure of site pages using a region-based system. Each region (header, sidebars, etc.) has sub-regions (start, middle, end) where components can be placed.

Example:

[site.layout]
preset = "docs"

[site.layout.header]
start = "logo"
end = ["icon-links", "color-mode"]

preset

Type: LayoutPreset (optional)

Named preset to use as base (docs, blog, landing, api)

Presets provide sensible defaults that can be extended with explicit config.

ValueDescription
docsDocumentation site: nav-tree left, toc-tree right, breadcrumbs, prev-next
blogBlog/article site: no left sidebar, toc-tree right, no prev-next
landingLanding page: no sidebars, centered content
apiAPI reference: nav-tree left (flat), no right sidebar

main

Type: MainConfig (optional)

Main content area configuration

header

Type: RegionConfig (optional)

Header region configuration

left-sidebar

Type: RegionConfig (optional)

Left sidebar region configuration

top

Type: RegionConfig (optional)

Top region configuration

bottom

Type: RegionConfig (optional)

Bottom region configuration

right-sidebar

Type: RegionConfig (optional)

Right sidebar region configuration

footer

Type: RegionConfig (optional)

Footer region configuration

responsive

Type: ResponsiveConfig (optional)

Global responsive configuration for sidebar collapse

components

Type: components

Named component definitions for reuse

overrides

Type: array

Route-specific layout overrides

First matching override wins (order matters).

Example:

[[site.layout.overrides]]
routes = ["/blog/**"]
left-sidebar = false

This documentation was generated from layout/config.rs by generate.rs.

© 2026 Stencila