Configuration
The three places you configure the template - site config, Astro config and environment variables.
src/site.config.ts#
The single source of truth for branding and navigation. It is a plain TypeScript object, so it
is safe to import from astro.config.ts, from components and from Node scripts.
export const siteConfig = {
name: 'Strata',
tagline: 'The layered Astro stack: auth, content, search and security, already in place.',
url: 'https://stratastack.dev',
nav: [{ label: 'Docs', href: '/docs' } /* … */],
// …
} as const;
Changing name, tagline or description updates the header, footer, <title> template,
Open Graph tags, JSON-LD and the web manifest in one go. Every field is listed in the
site configuration reference.
astro.config.ts#
The Astro configuration is annotated inline. The parts you are most likely to touch:
| Key | Purpose |
|---|---|
site |
Canonical URL: SITE_URL, else the platform’s production URL, else siteConfig.url (config/site-url.ts). |
adapter |
Resolved by config/adapter.ts from DEPLOY_TARGET. See Deploy. |
fonts |
Self-hosted Inter and JetBrains Mono through Astro’s Fonts API. |
image |
Responsive images enabled with the constrained layout by default. |
markdown.shikiConfig |
Light and dark Shiki themes. |
security.csp |
Content Security Policy directives. See Security. |
env.schema |
Type-safe public environment variables. |
session |
Disabled; Better Auth stores sessions in the database. |
Environment variables#
Copy .env.example to .env. Variables fall into two groups.
Public variables are declared in env.schema, validated at build time and imported from
astro:env/client. They are inlined into the client bundle, so never put secrets here.
import { PUBLIC_ANALYTICS } from 'astro:env/client';
Server variables (database URLs, auth secrets, API keys) are read through process.env by
src/lib/env.ts. This keeps the Better Auth CLI, which loads src/lib/auth.ts outside Astro,
working, and behaves identically on Node, Vercel, Netlify and Cloudflare Workers with
nodejs_compat.
The environment variables guide lists every variable and where to set it on each platform.