- site.config.json single source of identity (name/url/description/author/social) - scripts/configure.mjs stamps it into app, content-pipeline, and astroagent configs - app/src/lib/blog-data.js SITE + author now read from app/src/config/site.json - astro.config.mjs default site URL from config - index.astro / Footer.astro neutralized hardcoded title, hero alt, social link - sample 'welcome' post + placeholder hero/avatar so the site builds out of the box Verified: cd app && npm ci && npm run build -> 13 pages, Complete. Remaining comiida demo prose in about/faq/services/contact + Newsletter (sample content). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SYHWLHihq3v9nxNwoPCKSn
28 lines
901 B
JavaScript
28 lines
901 B
JavaScript
import { readFileSync } from "node:fs";
|
|
import { defineConfig } from "astro/config";
|
|
|
|
const siteConfig = JSON.parse(
|
|
readFileSync(new URL("./src/config/site.json", import.meta.url)),
|
|
);
|
|
import mdx from "@astrojs/mdx";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
const site =
|
|
process.env.SITE_URL || process.env.PUBLIC_SITE_URL || siteConfig.url;
|
|
|
|
export default defineConfig({
|
|
site,
|
|
// astroagent overrides outDir for isolated preview builds (PREVIEW_OUT);
|
|
// falls back to the live output for normal/cron builds.
|
|
outDir: process.env.PREVIEW_OUT || "../public",
|
|
// For previews, PREVIEW_BASE prefixes asset paths (/_preview/<id>) so the
|
|
// preview is self-contained and doesn't pull _astro/fonts from the live site.
|
|
base: process.env.PREVIEW_BASE || undefined,
|
|
integrations: [mdx()],
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
build: {
|
|
emptyOutDir: false,
|
|
},
|
|
},
|
|
});
|