What vike-vue-content is and what it does for you.
vike-vue-content
vike-vue-content is a content rendering framework for Vike + Vue. Drop Markdown files into a content directory and it automatically generates routes, sidebar navigation, a page table of contents, and prev/next navigation — plus a batteries-included theme system.
This entire documentation site is rendered with vike-vue-content — the page you're reading is a live example.
Why use it
- Content as routes: the directory structure of
content/**/*.mdmaps directly to page paths, no route table to maintain. - Zero page boilerplate:
Pageanddataare auto-mounted by the config, so adding a doc is just writing Markdown. - A complete docs shell: sidebar, table of contents (TOC), and prev/next navigation are ready-made components.
- Live demos: auto-register
.vuedemos fromdemosDirand render live previews with source tabs from Markdown. - Theme system: 18 primary colors including
black, light/dark modes, radius and font customization — with no FOUC. - Prerender-friendly: a built-in
onBeforePrerenderStarthook enumerates every content path to emit static HTML. - Multi-entry / multi-locale: different page directories can host different content collections, so a multi-language site is natural.
Core concepts
| Concept | Description |
|---|---|
| Collection | A namespace for a set of content, matching a top-level directory under the content folder, e.g. zh-CN, en-US. |
| Base | The URL prefix a docs page is mounted at, inferred from the page file's location under pages/, e.g. /en-US. |
| Content Entry | The structured data of a parsed Markdown file: title, description, TOC, body AST, etc. |
| Navigation | The sidebar tree built from the content directory structure plus .config.yml / frontmatter. |
Next steps
- Getting Started: wire up a docs site in 5 minutes.
- Content-driven Routing: understand how directories map to routes.
- Components: DocsPage and friends.
- ThemeToggle: theme mode toggle button.
- ThemeSettings: full theme panel.
- Demo: render live previews with source code.
- Theme System: customize the look.