// Web app for the {{projectName}} project — a BILINGUAL (en/de) STATIC blog. // // Every page declares `renderMode = 'static'`, so `voltro build` // pre-renders flat HTML at build time and `voltro start` (or any CDN // via `voltro static deploy`) serves it with zero per-request work. // `port` is allocated by the scaffolder from the project's portRange. // // Strategy B (URL-prefix i18n): the default locale lives at the bare path // (`/`, `/blog/…`) and every other locale is prefixed (`/de`, `/de/blog/…`). // `locales` is load-bearing — it tells `voltro build` to pre-render a // per-locale HTML variant for every `[locale]/…` mirror page, each wrapped // in the right catalog's . Cookie i18n can't translate a // zero-hydration static page, so the URL strategy is the only one that works // here. Every code listed MUST have a matching `src/locales/.ts`. Keep // this in sync with SUPPORTED_LOCALES / DEFAULT_LOCALE in src/lib/locale.ts. import { defineEnv, envVar } from '@voltro/env' // Public, build-time env (baked into the bundle; read via `publicEnv`). // Never a secret here — a static site has no server to hide one. export const env = defineEnv({ VOLTRO_PUBLIC_SITE_NAME: envVar.string({ access: 'public', default: '{{capProjectName}}' }), }) export default { type: 'web' as const, name: '{{capProjectName}}{{capAppName}}', port: {{port}}, // Follow the visitor's OS theme, set before first paint (no flash). theme: 'system' as const, // The shipped catalogs. `defaultLocale` MUST be one of `locales`. locales: ['en', 'de'] as const, defaultLocale: 'en' as const, env, }