Routing
File-based routing, source directory structure, clean URLs, and route rewrites
File to URL Mapping
.
├─ index.md → /index.html (/)
├─ about.md → /about.html
├─ guide/
│ ├─ index.md → /guide/index.html (/guide/)
│ └─ getting-started.md → /guide/getting-started.htmlProject Structure
.
├─ docs # Project root
│ ├─ .vitepress # VitePress directory
│ │ ├─ config.ts # Configuration
│ │ ├─ theme/ # Custom theme
│ │ ├─ cache/ # Dev server cache (gitignore)
│ │ └─ dist/ # Build output (gitignore)
│ ├─ public/ # Static assets (copied as-is)
│ ├─ index.md # Home page
│ └─ guide/
│ └─ intro.mdSource Directory
Linking Between Pages
Clean URLs
Route Rewrites
Public Directory
Base URL
Key Points
Last updated
Was this helpful?