npm create @fluid-app/fluid-site my-site starts you on Vite and React; an existing Vite project needs only the SDK.
Set up
src/main.tsx
base of / and its default build folder, dist.
Routing
With noconfig/routes.json, every path that isn’t a file is answered by index.html, which is what a client-side router needs. Inside the storefront, let your router follow Back and Forward:
Search engines and link previews
A single-page app’sindex.html is empty until its script runs, so a crawler that doesn’t run JavaScript sees nothing. Add the fluidSite() plugin from @fluid-app/sites/vite, and the build writes what crawlers read:
vite.config.ts
vite build, it reads config/meta.json and writes:
- the title, description, Open Graph and Twitter tags into
index.html; - one
index.htmlper route, such asevents/index.html, each with that route’s own tags; llms.txt, andsitemap.xmlwhenconfig/meta.jsongives the site’s absoluteurl.
noindex is left out of the sitemap and llms.txt. See SEO and indexing for config/meta.json, and for which title wins on the storefront.
Deploy
fluid sites dev instead of npm run dev to get a working fluid.db while you build.