# Build VitePress Documentation Sites

VitePress projects need correct configuration, routing, Markdown patterns, and deployment settings. This skill gives Claude, Codex, and Claude Code focused guidance for building and maintaining VitePress sites.

## Install

```bash
npx skillstore add antfu/vitepress
```

## Metadata

- - Slug: antfu-vitepress
- - Version: 1.0.0
- - Author: antfu
- - GitHub username: antfu
- - License: MIT
- - Repository: https://github.com/antfu/skills/tree/main/skills/vitepress/
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: low
- - Risk factors: external\_commands, network, scripts, filesystem
- - Quality score: 75
- - Public page: https://skillstore.pages.dev/skills/antfu-vitepress
- - Manifest: https://skillstore.pages.dev/api/skills/antfu-vitepress/manifest

## Capabilities

- Explains VitePress project setup, CLI commands, and common package scripts.
- Guides site configuration for metadata, base paths, build options, rewrites, and Markdown settings.
- Documents Markdown features, code block options, Vue usage, data loading, and dynamic routes.
- Covers default theme navigation, sidebar, search, social links, footer, and edit link settings.
- Provides custom theme and default theme extension guidance for Vue components and CSS variables.
- Summarizes deployment patterns for GitHub Pages, Netlify, Vercel, Cloudflare Pages, GitLab Pages, Firebase, and Nginx.

## Use Cases

- Create a Documentation Site: Generate a practical VitePress structure with configuration, navigation, sidebar, and starter Markdown pages.
- Improve Existing Docs: Review routing, Markdown usage, code blocks, theme settings, and content organization for an existing site.
- Prepare a Static Site Deployment: Choose build commands, output directories, base paths, cache headers, and hosting configuration for common platforms.

## Prompt Templates

### Start a Basic Site

```
Create a simple VitePress documentation plan for my project. Include config, pages, navigation, sidebar, and package scripts.
```

### Configure Theme Navigation

```
Help me design VitePress themeConfig for these docs sections: [sections]. Include nav, sidebar, edit links, search, and footer.
```

### Add Data-Driven Pages

```
Design a VitePress dynamic route workflow for [content type]. Explain the template, paths loader, watched files, and content payload.
```

### Audit and Deploy Docs

```
Review my VitePress configuration and deployment target: [details]. Identify build, base path, routing, cache, SSR, and hosting issues.
```

## Limitations

- The skill is based on VitePress 1.x documentation generated on 2026-01-28.
- It provides guidance and examples, but it does not run builds, deploy sites, or validate hosting accounts.
- It cannot guarantee compatibility with future VitePress, Vue, Node, or hosting provider changes.
- Generated configuration should be reviewed against the project repository and deployment environment.

## Best Practices

- Check \`.vitepress/config.ts\` before changing routes, theme settings, or deployment paths.
- Keep build-time data small because VitePress serializes loaded data into the client bundle.
- Review generated commands and deployment settings before running them in a repository or CI environment.

## Anti Patterns

- Do not copy placeholder API keys, URLs, or organization names into production configuration.
- Do not access browser-only APIs at module level in Vue components used by VitePress.
- Do not deploy with an incorrect base path for GitHub Pages or sub-path hosting.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T09:52:17.455\+00:00
- - Summary: Static analysis reported many high-risk patterns, but review found they are Markdown reference examples for VitePress usage rather than executable skill code. No prompt injection, credential exfiltration, malicious network behavior, or hidden command execution was found; residual risk is limited to examples that may guide users to run normal build, deploy, fetch, or file-loading workflows.

## Stats

- - Views: 535
- - Downloads: 5
- - Favorites: 0
- - Popularity score: 0
