Index of every page on this site: llms.txt
All skills
skilld-dev avatar

/vitepress-skilld

@c60d4cc
Run it yourself

Use when writing, configuring, or debugging code that imports "vitepress", when running vitepress CLI commands, editing .vitepress/config or theme files, tuning markdown or default theme options, or migrating a VitePress site. Provides the vitepress@1.6.4 API surface, config reference, theme reference, CLI usage, and v1 migration notes.

Use this Skill: https://skilld.dev/gh/skilld-dev/vue-ecosystem-skills/vitepress-skilld

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈89 tokens for metadata: the name and description. ≈1.6k when used: this file. ≈6.6k more on demand in 6 files.

Description uses 4.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈357 characters, or 4.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

vitepress@1.6.4

Vite & Vue powered static site generator (vuejs/vitepress). Source of truth in this Skill is the prepared package source; line citations are relative to the package root (for example dist/node/index.d.ts:2382).

Version facts

  • Version 1.6.4, MIT (package.json:3).
  • Bundles Vue ^3.5.13, Vite ^5.4.14, shiki ^2.1.0, minisearch ^7 (package.json:59-78).
  • Requires Node.js 18+ (https://vitepress.dev/guide/getting-started).
  • VitePress v1 is not compatible with rolldown-vite; the dev server prints an error and directs to VitePress v2 (dist/node/cli.js:438-444).
  • Optional peers: markdown-it-mathjax3 (for markdown.math), postcss (package.json:155-166).

Entry points

Defined by the export map in package.json:18-37:

Import Types entry Use for
vitepress types/index.d.ts Node + client + shared API, config helpers
vitepress/client client.d.ts Client composables (useData, useRouter, …)
vitepress/theme theme.d.ts Default theme, useSidebar, useLocalNav
vitepress/theme-without-fonts theme-without-fonts.d.ts Default theme without bundled font files

CLI binary: vitepress → bin/vitepress.js.

Setup and commands

npm add -D vitepress
npx vitepress init
npx vitepress dev
npx vitepress build
npx vitepress preview

dev may be omitted when using the current directory (vitepress alone). serve is an alias of preview. Full flags and dev shortcuts: cli.md

Common tasks

Site config (.vitepress/config.ts)

import { defineConfig } from 'vitepress'

export default defineConfig({
  title: 'My App',
  description: 'A VitePress site',
  themeConfig: {
    nav: [{ text: 'Guide', link: '/guide/' }],
    sidebar: [{ text: 'Guide', items: [{ text: 'Intro', link: '/guide/intro' }] }]
  }
})

defineConfig is typed for the default theme; use defineConfigWithTheme<CustomThemeConfig> for a custom theme (dist/node/index.d.ts:2382-2386). Every option: site-config.md

Client runtime API

<script setup>
import { useData, useRouter, withBase } from 'vitepress'
const { page, frontmatter, isDark, hash } = useData()
const router = useRouter()
</script>

Full export list and signatures: api.md

Build-time data loading

// posts.data.js
import { createContentLoader } from 'vitepress'
export default createContentLoader('posts/*.md', { excerpt: true })

Import as import { data } from './posts.data.js'. Runs in Node only; the result ships as JSON in the client bundle.

Browser-only components

<script setup>
import { defineClientComponent } from 'vitepress'
const Chart = defineClientComponent(() => import('./Chart.vue'))
</script>

Prevents SSG build failures when a library touches window/document on import (https://vitepress.dev/guide/ssr-compat).

Best practices

Deeper references

  • api.md: every export from vitepress, vitepress/client, vitepress/theme, data loader types, theme interface.
  • site-config.md: UserConfig fields, build hooks, SiteConfig, mergeConfig.
  • default-theme.md: DefaultTheme.Config, nav, sidebar, search (local and algolia), theme extension.
  • markdown.md: markdown options, shiki setup, containers, math, createMarkdownRenderer.
  • cli.md: commands, flags, dev shortcuts, scaffolding.
  • migration.md: v0 → v1 breaking changes and deprecations still visible in 1.6.4.

Version-specific changes

Prioritize these when touching old configs; details and citations in migration.md:

  • BREAKING (v1.0.0-rc.9): pathname:// protocol removed; use target="_self" or target="_blank" (https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md).
  • BREAKING (v1.0.0): sidebar children renamed to items; top-level items no longer accept link (https://vitepress.dev/guide/migration-from-vitepress-0).
  • BREAKING (v1.0.0-alpha.44): collapsible replaced by collapsed: boolean (CHANGELOG).
  • BREAKING (v1.0.0-alpha.57): markdown.headers disabled by default; PageData.headers is empty unless enabled (CHANGELOG).
  • When markdown.headers is enabled, extraction levels default to [2, 3] (dist/node/index.d.ts:1769-1786).
  • NEW (v1.1.0): useData().hash reactive URL hash (dist/client/index.d.ts:79-83).
  • NEW (v1.4.0): onAfterPageLoad router hook (dist/client/index.d.ts:36-38).
  • NEW (v1.3.0): appearance: 'force-auto' (types/shared.d.ts:119-124).
  • Deprecated in 1.6.4: Theme.setup, Theme.NotFound (dist/client/index.d.ts:96-103), outlineTitle, lastUpdatedText, algolia theme options (types/default-theme.d.ts:36-77,139-141).

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides comprehensive documentation and technical references for VitePress v1.6.4. It includes details on CLI commands, API surfaces, configuration, and migration. The content is strictly informational and follows official development guidelines without any detected security risks.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at c60d4cc. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated last month

README badge

README badge for skilld-dev/vue-ecosystem-skills/vitepress-skilld