Public website for the GMU CREATE Lab. Content is managed in the sibling CMS and fetched at runtime.
- SvelteKit with Svelte 5 runes
- TailwindCSS v4 (theme tokens in
src/lib/css/app.css) @sveltejs/adapter-vercelon Vercel,@sveltejs/adapter-staticeverywhere else (see Deployment)@iconify/sveltefor icons- Bun for installing and running
bun install
bun run dev # start the dev server
bun run build # production build
bun run preview # preview the buildSet PUBLIC_CMS_URL in .env to the CMS URL. The client in src/lib/ts/cms.ts fetches all
content from it; uploaded assets are referenced as /api/files/<id> and resolved against that URL.
vite.config.ts picks the adapter automatically:
- On Vercel, the
VERCELenv var is set by their build system, sobun run builduses@sveltejs/adapter-vercel. No extra setup needed. - Anywhere else (e.g. your machine, CI),
bun run builduses@sveltejs/adapter-staticand produces a plain static/SPA build inbuild/, withindex.htmlas the entry point and all routing handled client-side. Apostbuildstep copiesindex.htmlto404.htmlso a static host without rewrite rules still serves the app for direct links like/events/some-talk.
Before building for a static host, make sure PUBLIC_CMS_URL points at the real production CMS
(e.g. via a .env.production file), since it gets baked into the build at build time. Upload the
contents of build/ to the host.