Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 28, 2026·3 min de lecture

VuePress — Vue-Powered Static Site Generator for Documentation

VuePress is a minimalistic static site generator built on Vue.js, designed for writing technical documentation with Markdown and extending pages with Vue components.

Introduction

VuePress is a static site generator created by Evan You (the author of Vue.js) that turns Markdown files into a fast, search-enabled documentation website. Each Markdown page is compiled into a Vue component, so authors can embed interactive Vue elements directly inside their prose without leaving the Markdown workflow.

What VuePress Does

  • Converts Markdown files into a pre-rendered static site with client-side hydration
  • Allows Vue components to be used directly inside Markdown content
  • Provides a default documentation theme with sidebar navigation, search, and header anchors
  • Generates SEO-friendly HTML with automatic meta tags from front matter
  • Supports i18n with per-locale directory structures and navigation

Architecture Overview

VuePress 2.x uses Vite (or Webpack) as its bundler. During build, each Markdown file passes through markdown-it, gets wrapped in a Vue single-file component, and is compiled by the Vue compiler. The result is a server-rendered HTML page plus a client-side Vue app that hydrates on load for SPA-like navigation. Plugins hook into the build pipeline via a Node.js API to extend Markdown parsing, page data, or client behavior.

Self-Hosting & Configuration

  • Scaffold a project with npm init vuepress or add VuePress to an existing repo
  • Configure site title, description, theme, and plugins in .vuepress/config.ts
  • Organize documentation as Markdown files in a source directory with front matter
  • Build with vuepress build docs and deploy the dist/ output to any static host
  • Use GitHub Actions, Netlify, or Vercel for automated deploys on push

Key Features

  • First-class Vue component support inside Markdown for interactive documentation
  • Built-in full-text search without external services
  • Hot module replacement during development for instant preview
  • Extensible plugin system for custom containers, code highlighting, and page transforms
  • Multiple theme support with a polished default theme for technical docs

Comparison with Similar Tools

  • Docusaurus — React-based documentation generator by Meta, larger ecosystem, MDX instead of Vue
  • GitBook — Commercial documentation platform with a hosted editor, less customizable
  • MkDocs — Python-based with Material theme, simpler setup, no client-side framework integration
  • Nextra — Next.js-powered documentation framework, React-based, strong MDX support
  • Astro — Framework-agnostic static generator, supports Vue but not documentation-first by default

FAQ

Q: What is the difference between VuePress 1.x and 2.x? A: VuePress 2.x rewrites the core in TypeScript, uses Vue 3 and Vite by default, and introduces a new plugin API. VuePress 1.x runs on Vue 2 and Webpack.

Q: Can I use VuePress for a blog instead of documentation? A: Yes. Community plugins add blog functionality (post lists, tags, RSS), though VuePress is optimized primarily for documentation layouts.

Q: How does VuePress compare to VitePress? A: VitePress is a spiritual successor focused on simplicity and performance, using Vite exclusively. VuePress 2.x offers more plugins and themes but is heavier.

Q: Does VuePress support custom themes? A: Yes. You can create a full custom theme or extend the default theme by overriding specific layouts and components.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires