Appearance
VitePress Setup Guide
What is VitePress?
VitePress is a documentation site generator that turns markdown files into a browsable website with search, navigation, and hot-reloading.
Installation
Add VitePress to package.json dependencies:
- Add
"vitepress": "^1.6.4"to devDependencies - Add scripts:
"docs:dev": "vitepress dev""docs:build": "vitepress build""docs:preview": "vitepress preview"
- Add
Run
yarn installto install VitePress
Configuration
- Create
.vitepress/config.mtsin the project root with this content:
typescript
import { defineConfig } from 'vitepress'
export default defineConfig({
title: "webseriously docs",
description: "Project documentation and design notes",
srcDir: './notes/designs',
srcExclude: [],
themeConfig: {
nav: [
{ text: 'Home', link: '/' }
],
sidebar: [],
search: {
provider: 'local'
}
}
})Key settings:
srcDir: './notes/designs'- Only look in notes/designs directory (ignores archives automatically)srcExclude: []- No additional exclusions neededsearch: { provider: 'local' }- Enables search
Running
- Start the dev server:
yarn docs:dev - Open browser to the URL shown (usually on port 5176)
- Edit markdown files in notes/designs - changes appear instantly
How It Works
- VitePress reads all
.mdfiles innotes/designs - File paths become URLs (e.g.,
guides/debugging.md→/guides/debugging) - The sidebar and nav can be configured in config.mts
- Search indexes all markdown content automatically
To Have Claude Set This Up
Say: "Read vitepress.md and set it up"