The masthead shows the site title, the publication label, the search box, the dark mode toggle when it's on, and any links you configure. Add links under site.header.links:
site:
title: Example documentation
header:
links:
- { label: Guides, href: /start }
- { label: GitHub, href: "https://github.com/example/project", style: button }
- { label: Get started, href: /start, style: primary }
Links appear in list order, after the search box and toggle.
Link settings
Use these settings to configure each link shown in the header.
| Setting | Required | Value |
|---|---|---|
label |
Yes | Visible link text. |
href |
Yes | A site-root path such as /start, an http or https URL, or a mailto: link. |
style |
No | link (default), button, or primary. |
link renders as plain text. button has an outline. primary fills with --color-accent and uses --color-accent-contrast for its text. Use one primary link at most, for the action you most want readers to take.
External http and https links get rel="noopener". The build rejects any other URL scheme, including javascript:.
Layout and themes
On narrow screens, the search box and links wrap onto their own row below the site title. Each theme preset restyles them to match its shape. The CSS and theme reference lists their classes.
Header links are part of the HTML page only. Markdown twins and /llms.txt do not include them.