Customizing the Header
Files: src/config/config.toml, src/i18n/<lang>.json, src/layouts/components/global/header/ · Skill level: Beginner
In Tina and Sanity, the button and announcement are under Site settings > Settings (at /admin/ or in the Studio), and their labels are in Interface labels.
Lumio includes three header variants and several configurable header features:
- Logo – Update your site’s logo
- Menus – Organize and manage navigation menus. See also Navigation
- Internationalization (i18n) – Enable multiple languages
- Navigation Button – Configure the button in the header.
- Announcement Bar – Used by
HeaderThree.
Customizing the Navigation Button
Open src/config/config.toml and locate the following section:
# Navigation Button In Header[settings.navigationButton] enable = true label = "" url = "/contact/"enable and url apply to all three headers. The label depends on the header:
| Header | The button’s label |
|---|---|
Header.astro | label in config.toml. If it is empty, navigation.buttonLabel in the language file |
HeaderTwo.astro, HeaderThree.astro | Always button.getAQuote in the language file |
Updating the Button Label
To change the label in each language:
- Open
src/i18n/<lang>.json, such asen.json,fr.json, orar.json. Change it in every language. - Locate the
"navigation"object for the first header, or the"button"object for the other two. - Update
"buttonLabel"or"getAQuote".
Example: English (en.json)
"navigation": { "buttonLabel": "Get Started"}Using Different Header Variants
Lumio’s base layout supports three header variants:
type Props = { header?: "one" | "two" | "three";};You can switch a page to a different header by passing header="two" or header="three" into <Base />. See Header & Footer Variants.
Announcement Bar for Header Three
HeaderThree.astro reads from settings.announcementBar:
[settings.announcementBar] enable = true label = ""If label is empty, Lumio falls back to header.announcement from the active language file.