Website Config
Every websiteConfig field and what its switches mean
Last updated October 29, 2026
src/config/website.ts is the single entry point for site configuration and exports the websiteConfig object. Name, logo, switches, and social links all live here.
// src/config/website.ts
export function createWebsiteConfig(env: PublicEnv): WebsiteConfig {
return {
baseUrl: env.VITE_BASE_URL,
metadata: { name: 'Jerbix', images: { /* … */ } },
ui: { defaultTheme: 'system', enableThemeSwitch: true, themeColor: { /* … */ } },
docs: { enabled: true },
// …
}
}Prerequisites
A working local setup, see Getting Started.
Setup
Site identity
metadata: {
name: 'Jerbix', // site name, used in titles and OG tags
images: {
ogImage: '/logo.png', // social share image (1200×630)
logoLight: '/logo-horizontal-transparent.svg', // light-theme wordmark
logoDark: '/logo-horizontal-dark.svg', // dark-theme wordmark
icon: '/icon-jerboa.svg', // favicon
},
}See Design System for how the logo is rendered.
Template homepage marketing
template: {
priceUsd: 99,
productId: 'template',
offerId: 'once',
}Pricing is shown in the homepage #pricing section. The old /pricing URL redirects to that section in the current language and no longer shows the demo plan page.
The homepage uses the existing Checkout flow. productId / offerId select template.prices.once = 'jerbix_template' in src/config/products.ts; no external sales URL is needed. Configure that Stripe lookup_key with a one-time USD 99 price. The server checks the actual amount against priceUsd, along with the currency and payment mode, and rejects missing or mismatched prices.
Enable auth.enabled and payment.enabled. Guests sign in or register first, with the return path preserved through email verification. They return to the homepage pricing section to continue purchasing. Cancelling Checkout returns there too; successful payments return to billing, with payment records confirmed by the existing webhook. “See how to start” links to the current language’s docs, falling back to features when docs are disabled.
Theme
ui: {
defaultTheme: 'system', // 'light' | 'dark' | 'system'
enableThemeSwitch: true, // show the toggle in the navbar
themeColor: { // browser chrome and PWA background
light: '#FCFAFF',
dark: '#0A0A0F',
},
}themeColormust match--backgroundinstyles/globals.css. These values render outside the page and cannot read CSS variables, so they must be declared here.tests/unit/theme-colors.test.tsasserts equivalence — change both together.
Module switches
Every optional module has enabled. When off, its pages 404, its API returns 404 MODULE_DISABLED, and navigation entries hide themselves.
docs: { enabled: true },
blog: { enabled: true },
changelog: { enabled: true },
mail: { enabled: true, provider: 'resend', supportEmail: 'service@jerbix.site' },
contact: { enabled: false },
newsletter: { enabled: false, provider: 'resend' },
payment: { enabled: true, provider: 'stripe', /* … */ },
notification: { enabled: false, provider: 'discord' },
analytics: { enabled: true, providers: ['ga'] },
auth: { enabled: true, requireEmailVerification: true },| Field | Default | Notes |
|---|---|---|
docs / blog / changelog | true | Content modules, pages already exist |
mail | true | Transactional email. supportEmail feeds a mailto: entry |
contact | false | Contact form |
newsletter | false | Email subscriptions |
payment | true | Stripe checkout and billing page |
notification | false | Discord / Feishu webhooks |
analytics | true | Analytics scripts; requires VITE_GA_ID when enabled |
auth | true | Sign-in and registration; off means the whole auth path 404s |
auth.requireEmailVerificationis a security control, not an email switch, and currently defaults totrue. Resend mail is also enabled: configureRESEND_API_KEYand a plainMAIL_FROMaddress on a verified domain. Required verification with incomplete mail makesauthreportincomplete, the auth API return 503, andpnpm check:env:prodfail. Verification is never implicitly disabled.supportEmailisservice@jerbix.siteand is independent ofMAIL_FROM; see Authentication and Email.
Feature switches
features: {
enableI18n: true, // zh / en
enableFileUpload: false, // uploads (needs R2)
enableApiKeys: true, // self-service API keys
enableAdmin: true, // admin dashboard
enableAIGateway: false, // AI gateway
}Social links
social: {
github: 'https://github.com/your-org/your-repo',
x: 'https://x.com/your-handle',
}Only valid HTTPS URLs without credentials are rendered. Supported platforms are listed in the WebsiteConfig['social'] type.
References
- Navigation & Menus — navbar, footer, docs sidebar
- Environment — where
baseUrlcomes from