Getting Started
Install
Section titled “Install”npm install # Node 24 (see .nvmrc)npm run dev # astro dev → browse the rendered listing/detail pagesPoint it at your content
Section titled “Point it at your content”The loader reads SUBFOLIO_CONTENT_DIR, defaulting to the bundled content/examples/
fixture so the repo runs standalone. Point it at a live Subfolio install’s directory/
to run against real content.
Set it in .env.content (gitignored):
SUBFOLIO_CONTENT_DIR=/path/to/subfolio/directoryThen run through ./dev-content.sh instead of npm directly. Astro only loads
dotenv values at render time — not at config time when the loader resolves the
content directory, and the gen-* scripts read no dotfile at all — so the wrapper
promotes SUBFOLIO_CONTENT_DIR from .env.content to a real exported shell var
before either build phase runs:
./dev-content.sh # npm run dev./dev-content.sh build # npm run build./dev-content.sh preview # npm run previewPlain npm run dev still works — it just falls back to content/examples/.
First build
Section titled “First build”npm run build # astro check (types) + astro buildnpm run preview # serve the static build locallyEvery convention in the Conventions reference
is exercised by the bundled fixture, so a plain npm run build is enough to see
everything render — no live content needed to get started.