Files
com.gregkilmer.www/services/site/astro.config.mjs
T
Claude 7025e95f89 Site app foundation on the content service
services/site is an Astro app rendered on request by the Node adapter. It
keeps every published note in memory from the content service, refreshes
in the background, and keeps serving the last good copy if the service is
down. SiteIndex answers lookups, addresses, links both ways with roll-ups,
the status log and safe Markdown. Vault images pass through /media.
docs/site.md has the URL map and page rules.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012aSbo2D1qP8cMFQCykf7kx
2026-10-11 21:15:39 +00:00

19 lines
708 B
JavaScript

// The public site. Pages render on request from the content service's
// published notes, so a saved note is live within a minute without a rebuild.
import node from "@astrojs/node";
import { defineConfig } from "astro/config";
export default defineConfig({
output: "server",
adapter: node({ mode: "standalone" }),
trailingSlash: "never",
build: { format: "file", assets: "assets" },
devToolbar: { enabled: false },
server: { host: true, port: Number(process.env.PORT ?? 4330) },
vite: {
ssr: { noExternal: ["@gk/ui"] },
// See packages/ui/astro.config.mjs: astro needs its own cookie, not express's.
environments: { prerender: { resolve: { noExternal: ["cookie"] } } },
},
});