VitePress is a Vue-powered static site generator. docmd delivers matching runtime speed while shipping zero client-side JavaScript framework overhead, eliminating Vue hydration delays.
1. Run the Migration Engine
Run the following command at the root of your existing VitePress project:
npx @docmd/core migrate --vitepress
pnpm dlx @docmd/core migrate --vitepress
yarn dlx @docmd/core migrate --vitepress
bunx @docmd/core migrate --vitepress
What Happens Automatically
- Backup: Your entire project directory (excluding
node_modules,.git,package.json, and lockfiles) is backed up safely into a newvitepress-backup/directory. - Content Migration: Your
docs/folder (or root Markdown files) is restored to the project root directory. The hidden.vitepressconfiguration directory is stripped to prevent conflicts. - Config Generation: A
docmd.config.jsonis generated, extracting your sitetitlefrom.vitepress/config.js,ts, ormjs.
2. Preview the Migration Output
Preview your Markdown content in docmd immediately:
npx @docmd/core dev
pnpm dlx @docmd/core dev
yarn dlx @docmd/core dev
bunx @docmd/core dev
3. Manual Configuration & Component Replacement
VitePress configures navigation inside JavaScript config modules and allows embedding Vue components. Translate these to docmd containers.
Navigation Setup
VitePress uses an array of objects in themeConfig.sidebar. Create a navigation.json inside your docs/ directory:
VitePress (.vitepress/config.js):
themeConfig: {
sidebar: [
{
text: "Guide",
items: [
{ text: "Introduction", link: "/introduction" },
{ text: "Getting Started", link: "/getting-started" }
]
}
]
}
docmd (navigation.json):
[
{
"title": "Guide",
"collapsible": true,
"children": [
{ "title": "Introduction", "path": "/introduction" },
{ "title": "Getting Started", "path": "/getting-started" }
]
}
]
Replacing Vue Components & Container Syntax
Because docmd does not execute client-side Vue, replace custom components with docmd Containers.
VitePress admonition containers work out of the box without modification:
:::tip→ renders ascallout tip:::warning→ renders ascallout warning:::danger→ renders ascallout danger:::info→ renders ascallout info:::details→ renders ascollapsible
VitePress container syntax is natively supported. Existing admonition blocks and collapsible details sections render correctly without editing your Markdown files.
Next Steps
- Explore
docmd’s Deployment Guide to set up GitHub Actions, Vercel, Netlify, or Docker builds. - Review the full set of visual Containers.