Configuration
package.json
Standard Node manifest plus the scripts block (sync, dev, build, start). No magicms config block.
astro.config.mjs
Integrations order matters:
export default defineConfig({
integrations: [
icon(),
expressiveCode(),
alpinejs(),
fonts(),
compress({ Image: false }) // must be last
]
});tsconfig.json
strict: true, paths: { "@/*": ["src/*"] }. Don't touch compilerOptions — the scaffold assumes defaults.
site.config.json
{
"languages": ["en"],
"productionUrl": "",
"previewUrl": "",
"homeSlug": "home",
"turnstileSiteKey": "",
"magicrmSiteId": "",
"readOnly": ["productionUrl", "previewUrl"]
}For Cloudflare Pages hash preview, set previewUrl to https://*.<project>.pages.dev (the * is the deployment hash). A normal URL is loaded as-is. readOnly is a hint to MagiCMS to render those fields as read-only when deploy infra owns them.
inline-text.config.json
semanticClasses (curated, used by BlockHeading) and extraClasses (catch-all for any Tailwind class). Regenerated safelist via npm run sync.
fonts.config.json
Astro Fonts config. See Fonts § Astro Fonts API.
magicms.project.json
{ "scaffoldVersion": "1.3.0", "canUpgradeScaffold": true }Set canUpgradeScaffold: false to opt out of upgrade suggestions.
package.json optionalDependencies
Pin linux-x64-gnu binaries for @tailwindcss/oxide, lightningcss and rolldown so Cloudflare Pages installs them even when the lockfile was generated on macOS. Versions must match the packages already in the lockfile. scripts/ensure-native-bindings.mjs runs before astro build if a binding is still missing.