
VitePress
SkillVitePress 静态站点生成器的参考:配置、命令行、文件路由、Markdown 扩展与在 Markdown 中使用 Vue 组件、构建期数据加载、动态路由、默认主题配置与自定义主题、多语言、SSR 兼容,以及部署到 GitHub Pages、Netlify、Vercel 等。基于 VitePress 2 alpha,由 Anthony Fu 从官方文档生成。
name: vitepress
description: VitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.
metadata:
author: Anthony Fu
version: "2026.9.25"
source: Generated from https://github.com/vuejs/vitepress, scripts located at https://github.com/antfu/skills
VitePress is a Static Site Generator (SSG) built on Vite and Vue 3. It takes Markdown content, applies a theme, and generates static HTML that becomes an SPA for fast navigation. Perfect for documentation, blogs, and marketing sites.
Key Characteristics:
- File-based routing with
.mdfiles - Vue components work directly in Markdown
- Fast HMR with instant updates (<100ms)
- Default theme optimized for documentation
- Built-in search (local or Algolia)
Before working with VitePress projects:
- Check
.vitepress/config.tsfor site configuration - Look at
.vitepress/theme/for custom theme extensions - The
public/directory contains static assets served as-is
The skill is based on VitePress 2.0.0-alpha.20, generated at 2026-09-25.
VitePress 2 notes (v1 → v2): install with vitepress@next; requires Node.js 22+. defineConfigWithTheme is deprecated — use defineConfig<ThemeConfig>. Native RTL support (dir option, CSS logical properties) replaces the old PostCSS-plugin approach. Built-in iconify pipeline (icons config, useIcon/VPIcon, collection:name social icons). New assetsBase (CDN) and assetsShards build options; metaChunk removed. Markdown image.lazyLoading renamed to image.lazyLoad.
Core
| Topic | Description | Reference |
|---|---|---|
| Configuration | Config file setup, defineConfig, site metadata | core-config |
| CLI | Command-line interface: dev, build, preview, init | core-cli |
| Routing | File-based routing, source directory, rewrites | core-routing |
| Markdown | Frontmatter, containers, tables, anchors, includes | core-markdown |
Features
Code & Content
| Topic | Description | Reference |
|---|---|---|
| Code Blocks | Syntax highlighting, line highlighting, diffs, focus | features-code-blocks |
| Vue in Markdown | Components, script setup, directives, templating | features-vue |
| Data Loading | Build-time data loaders, createContentLoader | features-data-loading |
| Dynamic Routes | Generate pages from data, paths loader files | features-dynamic-routes |
Theme
| Topic | Description | Reference |
|---|---|---|
| Theme Config | Nav, sidebar, search, social links, footer | theme-config |
| Customization | CSS variables, slots, fonts, global components | theme-customization |
| Custom Theme | Building themes from scratch, theme interface | theme-custom |
Advanced
| Topic | Description | Reference |
|---|---|---|
| Internationalization | Multi-language sites, locale configuration | advanced-i18n |
| SSR Compatibility | Server-side rendering, ClientOnly, dynamic imports | advanced-ssr |
Recipes
| Topic | Description | Reference |
|---|---|---|
| Deployment | GitHub Pages, Netlify, Vercel, Cloudflare, Nginx | recipes-deploy |
相關資源

Hugo
CLI用 Go 编写的静态站点生成器,把 Markdown 内容在数秒内构建成文档站、博客或落地页,自带本地预览服务器以及图片、CSS 与 JS 处理管线。
gohugoio/hugo90.6k
Slidev
CLI用 Markdown 写幻灯片,内置代码高亮、LaTeX 公式与 Mermaid 图,slidev export 可导出 PDF、PPTX 或 PNG。导出前需在项目中安装 playwright-chromium。
slidevjs/slidev49.7k
lychee
CLIRust 编写的高速异步链接检查器,扫描网站以及 Markdown、HTML 等文件中的失效链接与邮箱地址,支持 JSON 输出和配置文件,另有官方 GitHub Action,常接在文档 CI 里。
lycheeverse/lychee4.2k
Nuxt
SkillNuxt 5 全栈 Vue 框架的参考:目录结构、配置、文件路由、useFetch 等数据获取、自动导入、服务端路由、渲染模式、SSR 与水合注意事项、模块与 Layers,重点说明 Nuxt 5 改用 Nitro v3 与 Vite 8 带来的变化。由 Anthony Fu 从官方文档生成。
antfu/skills6.1k
Vue
SkillVue 3.5 的参考:<script setup> 与 defineProps、defineEmits、defineModel 等宏,响应式 API、侦听器与生命周期,Transition、Teleport、Suspense、KeepAlive 等内置组件。要求 agent 一律用组合式 API 与 TypeScript 的 <script setup>,不需要深层响应时优先 shallowRef。由 Anthony Fu 从官方文档生成。
antfu/skills6.1k
Pinia
SkillPinia v4 状态管理的参考:定义 store 的 state、getters 与 actions,插件、在 store 中使用组合式函数、store 之间的组合,测试、SSR、Nuxt 集成与 HMR;建议优先用 Setup Store、解构时用 storeToRefs。由 Anthony Fu 从官方文档生成。
antfu/skills6.1k