FAQ
Answers to common questions about the template.
Can I remove authentication?#
Yes, but the admin area, the dashboard and the account routes depend on it, so remove those
together: src/lib/auth.ts, src/lib/auth-client.ts, src/lib/session.ts, src/lib/admin*.ts,
src/pages/api/auth, src/pages/api/account, src/pages/api/health.ts, the login, signup,
forgot-password, reset-password, dashboard, account-deleted and admin pages,
src/components/react/auth and react/account, src/components/site/AccountMenu.astro, the
admin actions, the session lookup in src/middleware.ts and the App.Locals types in
src/env.d.ts. Drop better-auth and @better-auth/drizzle-adapter from package.json and
regenerate the migrations. If you also remove the contact action, the site becomes fully static and
no adapter is needed.
Can I use PostgreSQL instead of libSQL?#
Yes. Swap @libsql/client for a serverless-friendly Postgres driver, change the Drizzle dialect
in drizzle.config.ts and src/db/client.ts, regenerate the Better Auth schema with
pnpm exec auth generate --adapter drizzle --dialect postgresql, and generate a fresh migration.
How do I create the tables in production?#
Add the database URL and token as GitHub Actions secrets (DATABASE_URL and
DATABASE_AUTH_TOKEN, or TURSO_DATABASE_URL and TURSO_AUTH_TOKEN) and run the Migrate
database workflow from the Actions tab. It applies the migrations in drizzle/ and runs again
automatically when a merged change adds one. Node and Docker hosts can also run
node scripts/migrate.ts next to the server. See the
database guide.
Why does astro dev not send the Content Security Policy?#
Astro only generates the CSP for builds. Test CSP changes with pnpm build && pnpm preview or
the e2e suite, which asserts that no page logs a violation.
Why is TypeScript pinned to 6.x?#
TypeScript 7 ships a new native compiler that @astrojs/check and typescript-eslint do not yet
accept. The pin keeps pnpm check and pnpm lint working; raise it once both support TS 7.
Search returns nothing in development#
The Pagefind index is generated during pnpm build. Run a build once; the dev server then
serves the last generated index.
The compiler rejects my template#
Astro 7 no longer repairs invalid HTML. Close every non-void tag, avoid block elements inside
<p>, and write {' '} where whitespace between inline elements matters.
How do I add another deploy target?#
Add a case to resolveAdapter() in config/adapter.ts, extend DEPLOY_TARGETS, add a matrix
entry in .github/workflows/ci.yml, and document platform specifics under docs/deploy.
Where do I change the fonts?#
Replace the files in src/assets/fonts, update the fonts array in astro.config.ts and the
@theme inline block in src/styles/global.css. OG images read the static WOFF files directly
in src/pages/og/[...slug].png.ts.