globals, rows keyed by name. They are not page components, so stagePath does not apply. Use stageRef.
The footer global:
src/components/global/Footer.astro:
key is the global’s name. path is the field inside it. Edits save to the one row, last write wins. The same anchors work in the header.
Why a different anchor: stagePath addresses a component on the current page’s row. A global is its own row, shown on every page. stageRef names that row, so an edit made on any page lands in the one place, and every other page shows it on the next build.
Limits
- The row must exist. Globals are created when the site is set up, so the header and footer are already there. A new global is a request.
- Single fields only. Lists inside a global, such as navigation links, are editable item by item once anchored, but not addable from the admin.
- Same value everywhere. Content that differs per page belongs on the page.
Next steps
Shared content
The full reference-anchor contract.
Data model
Where globals sit among the tables.