On this page
· 2 min read
Installation
This guide walks through a static site that uses Svelte only on the server (svelte/server) and @pagesmith/site as the app-facing package for collections, markdown processing, and the Vite/SSG/runtime layer.
Dependencies
Runtime / build-time packages (see package.json in this folder for exact versions):
{ "dependencies": { "@pagesmith/site": "*", "pagefind": "^1.5.0", "svelte": "^5.55.1" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^7.0.0", "typescript": "^6.0.2", "vite": "^8.0.3", "vite-plus": "0.1.16" }}@pagesmith/site— collection definitions, schemas, markdown processing,pagesmithContent/pagesmithSsg,renderDocumentShell, and the shared runtime/CSS layer.svelte—renderfromsvelte/serverat SSG time only.pagefind— indexer dependency for the SSG plugin’s post-build step.vite+vite-plus+@sveltejs/vite-plugin-svelte— dev server and Svelte compilation.
Quick start
From the monorepo root:
git clone https://github.com/sujeet-pro/pagesmith.gitcd pagesmithvp installRun this example:
vp run dev:eg:svelteProduction build:
cd examples/frameworks/with-sveltenpm run buildOutput goes to ../../../gh-pages/examples/svelte/ per vite.config.ts.
Vite plugins
pagesmithContent— markdown → validated entries →virtual:content/*.pagesmithSsg—getRoutes/render, dev middleware, Pagefind after build.sharedAssetsPlugin— shared fonts/assets from@pagesmith/siteinto the output.