Most static sites keep navigation, theme options, and metadata in JSON, YAML, or TOML files. Sitepins can render those as forms, so an editor can change a menu label or a homepage headline without opening a code editor.
Choosing Which Files Appear
Config files are opt-in. Select them during setup or later, at Project Settings → Configure → Site Configs.
You can pick:
- Individual files —
theme.json,menu.json,config.toml - Whole folders — everything in
src/configorconfig/_default - Any mix of the two
Suggestions by framework:
- Astro / Next.js —
src/config - Hugo —
config/_default,hugo.toml,data,i18n
Selected files show up under Configs in the sidebar.
Editing a Config File
Config files open as a form only — no content editor, since there’s no body to write. Sitepins reads the file’s structure and builds fields from it:
- Strings become text inputs
- Booleans become toggles
- Numbers become number inputs
- Nested objects become grouped sections
- Arrays become repeatable rows
Comments in the source file are surfaced as help text next to the relevant field, so notes you leave for your team stay visible in the CMS.
Save commits the file like any other change.
If a config file has no recognizable structure — an empty file, or one Sitepins can’t map — you’ll see a prompt to create a schema for it instead of an empty form.
Config Actions
The … menu in a config file’s header:
- Duplicate — copy the file, either with an automatic
_copyname or one you choose. Sitepins commits the copy and opens it. - Edit as code — open the raw file in the code editor — Pro
Duplicating is handy for creating a variant of a config — a second menu file, a seasonal theme — without retyping it.
Config Files vs Content Files
| Content files | Config files | |
|---|---|---|
| Where | Your content folder | Files you select under Site Configs |
| Editor | Frontmatter form plus a body editor | Form only |
| Formats | Markdown, MDX, JSON, YAML, TOML | JSON, YAML, TOML |
| Save options | Publish, Push as Draft, Save as Draft | Save |
| Schema | Inferred, or defined explicitly | Inferred from the file’s structure |
Giving Config Files Better Fields
The inferred form is functional but generic — every string is a text box. To improve it, create a schema so you can add labels, help text, defaults, required flags, and dropdowns. See Content Schemas.
A dropdown sourced from a data file is particularly useful here: it lets editors pick a value from a list you control rather than typing one that has to match exactly.
A Word of Caution
Config files control how your site builds. A malformed value can break the build in a way a content typo won’t.
- Use schemas with defaults and dropdowns to reduce the chance of a bad value
- Watch the build status after a config change
- If a change breaks the build, undo the commit