Settings

ReferenceSchema API

s.settings()

The project's settings: the Studio's theme, the site's languages and the AI assistant, kept as content.

Use it for

  • Branding the Studio
  • Declaring the site's languages
  • Turning on the AI assistant

Reference

s.settings()

schema

The project's settings. One per project, at the root of the content tree: /settings.val.ts by convention. Every section is optional, so {} is a complete settings module.

Settings are content, so changing the Studio's theme or the assistant's tone takes an editor, not a deploy.

In Val Studio

Options

themeobject

The Studio's accent colour, corner radius and mode, and the colour it wears in a proposal.

localesobject

The languages of the site. Declaring them turns on the locale picker and s.locale().

assistantobject

Turns the AI assistant on, and tells it what the site is and how to write.

studioobject

How the Studio behaves, such as whether a publish asks for a commit message.

Example

settings.val.ts

settings.val.ts
export default c.define("/settings.val.ts", s.settings(), {
  theme: { accent: "#3b82f6", radius: "soft", mode: "dark" },
  locales: { available: ["en-US", "nb-NO"] },
  assistant: { enabled: true, tone: "Plain and direct." },
});
See alsoenable-ai