Run the dev server
Quick Start
Get the VitePress template running in 5 minutes
Run the dev server
From vitepress-template/:
npm run dev
VitePress starts at http://localhost:5657. The default site is showcase (set via SITE_NAME=showcase in .env).
Create a new site
Copy the showcase site as a starting point:
cp -r ../sites/showcase ../sites/my-site
Edit sites/my-site/settings.ts and sites/my-site/index.ts. Set SITE_NAME=my-site in .env.
Add a page
Add a new page file in sites/my-site/pages/ (or pages/docs/ / pages/blocks/ for organization):
// sites/my-site/pages/about.ts
import type { PageData } from '../../../../vitepress-template/scripts/generate-content'
export const aboutPage: PageData = {
title: 'About',
slug: 'about',
layout: 'standard',
blocks: [
{ blockType: 'pageHeader', title: 'About Us', description: 'Learn more about our team.' },
{ blockType: 'richText', content: 'Your content here.
', maxWidth: 'standard' },
],
}
Import and add it to the pages array in sites/my-site/index.ts.
Build for production
npm run build
Output goes to .vitepress/dist/. Deploy to Cloudflare Pages using wrangler (see Deployment).
Next: Project Structure