bfc6a65638
Multi-agent arch/UX review pass. Architecture: real HTTP 404 on not-found, breadcrumb links by slug not lowercased title, CMS pages surface their plugins, shared status taxonomy (src/lib/statuses.ts) consumed by all three frontend consumers, data-driven status filter, typed emdash collections (src/emdash-collections.d.ts), removed unused @astrojs/react + react deps and dead pnpm block, tsconfig extends Astro strict preset, dev deps pruned from the runtime image. UI/UX: fixed StatusBadge WCAG-AA contrast, labelled the search/filter controls, canonical URL + BreadcrumbList JSON-LD + og:type, human status labels, filtered result count + recoverable empty state, auto-submit filters, mobile overflow fixes, skip-to-content, :focus-visible. Commit the npm lockfile so the Dockerfile's `npm ci` path engages. astro check: 0 errors / 0 warnings / 0 hints.
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
import node from "@astrojs/node";
|
|
import { defineConfig, memoryCache } from "astro/config";
|
|
import emdash, { local } from "emdash/astro";
|
|
import { sqlite } from "emdash/db";
|
|
|
|
// Persistent state directory. Defaults to the working directory for dev/DDEV
|
|
// (so data.db + uploads/ stay where you'd expect them). The k8s deploy sets
|
|
// STATE_DIR=/app/state and mounts a PVC there so SQLite + uploads survive
|
|
// pod replacement.
|
|
const stateDir = process.env.STATE_DIR ?? ".";
|
|
|
|
export default defineConfig({
|
|
output: "server",
|
|
adapter: node({ mode: "standalone" }),
|
|
trailingSlash: "ignore",
|
|
server: { host: true, port: 4321 },
|
|
vite: {
|
|
server: {
|
|
// Dev runs behind DDEV's nginx (https://cms-plugins.ddev.site/).
|
|
// Vite's host check must allow the public hostname.
|
|
allowedHosts: ["cms-plugins.ddev.site", ".ddev.site"],
|
|
},
|
|
},
|
|
image: {
|
|
layout: "constrained",
|
|
responsiveStyles: true,
|
|
},
|
|
integrations: [
|
|
emdash({
|
|
database: sqlite({ url: `file:${stateDir}/data.db` }),
|
|
storage: local({
|
|
directory: `${stateDir}/uploads`,
|
|
baseUrl: "/_emdash/api/media/file",
|
|
}),
|
|
}),
|
|
],
|
|
experimental: {
|
|
cache: { provider: memoryCache() },
|
|
},
|
|
devToolbar: { enabled: false },
|
|
});
|