Skill Press

No. 920 · vitepress

Vitepress

A field guide from Anthony Fu

Anthony Fu

When to use it

VitePress static site generator powered by Vite and Vue. Use when building documentation sites, configuring themes, or writing Markdown with Vue components.

Rank
No. 920 of 971
Installs
Not listed yet
Length
388 words · 2 min
Files
17
License
MIT

Get this skill

Download the skill folder (.zip, 34 KB) ↓ · SKILL.md only ↓

Agent prompt

Paste into a coding agent with terminal access. Check the upstream requirements for the skill you’re installing.

Prompt
Install the "vitepress" Agent Skill by Anthony Fu, from https://github.com/antfu/skills.

1. Fetch the whole folder skills/vitepress — SKILL.md plus every script, reference, and asset beside it, not just SKILL.md. For example:
   skill_checkout=$(mktemp -d)
   git init "$skill_checkout"
   git -C "$skill_checkout" fetch --depth 1 https://github.com/antfu/skills.git 4a6bb39e7b45e26402eb215393c51ccf5df1ca4c
   git -C "$skill_checkout" checkout --detach FETCH_HEAD
2. Copy it into your skills directory as a folder named "vitepress":
   - Claude Code: ~/.claude/skills/vitepress/ (all projects) or .claude/skills/vitepress/ (this project only)
   - Another agent: the directory you load Agent Skills from (folders containing a SKILL.md)
3. Check that vitepress/SKILL.md exists and its frontmatter says name: vitepress.
4. Read SKILL.md, then tell me in two or three sentences what the skill does and when it will trigger, and list any dependencies it mentions (Python packages, npm packages, CLIs) that aren't installed yet. Don't install them without asking.

skills CLI

One command; the skills.sh installer detects your agents (Claude Code, Cursor, Codex, and more).

Terminal
npx skills add https://github.com/antfu/skills/tree/4a6bb39e7b45e26402eb215393c51ccf5df1ca4c/skills/vitepress --skill vitepress

Contents

  1. Core
  2. Features
  3. Theme
  4. Advanced
  5. Recipes

The skill, in full

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 .md files
  • 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.ts for 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

More in Writing & Documents

All Writing & Documents skills →

More from Anthony Fu

From antfu/skills at 4a6bb39, MIT. Install counts from skills.sh.