VuePress Theme for Official Vue Projects (v1)

1.1.1 · maintenance · verified Sun Apr 19

The `@vuepress/theme-vue` package provides the official theme for VuePress 1.x, a minimalistic Vue-powered static site generator. Currently in maintenance mode, with its last major update (1.9.10) published approximately two years ago, this theme is built on Vue 2 and Webpack, inheriting the core architecture of VuePress v1. It focuses on delivering a robust, opinionated base for documentation sites, offering sensible defaults for navigation bars, sidebars, homepage layouts, and search functionalities. While VuePress v2 (based on Vue 3 and Vite/Webpack) offers a re-designed API and different theme system, this package remains the standard for projects specifically using VuePress v1. Its key differentiators include official backing for VuePress v1 and a highly customizable structure through `themeConfig` and custom styles, making it suitable for stable, established documentation projects that do not require migration to VuePress v2. Community-driven alternatives like `vuepress-theme-hope` typically target VuePress v2.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart sets up a basic VuePress v1 project with the `@vuepress/theme-vue` configured. It includes a `README.md` for the homepage, a 'guide' page, and a `.vuepress/config.js` with basic theme options, showing how to structure a VuePress v1 site to utilize this theme.

mkdir my-docs
cd my-docs

npm init -y
npm install -D vuepress @vuepress/theme-vue

mkdir .vuepress

cat > .vuepress/config.js << EOF
module.exports = {
  title: 'My VuePress v1 Site',
  description: 'A simple documentation site using the official VuePress v1 theme.',
  theme: '@vuepress/theme-vue',
  themeConfig: {
    navbar: [
      { text: 'Home', link: '/' },
      { text: 'Guide', link: '/guide/' }
    ],
    sidebar: [
      '/',
      '/guide/'
    ],
    lastUpdated: 'Last Updated',
    repo: 'vuejs/vuepress' // Example GitHub repo link
  }
}
EOF

cat > README.md << EOF
---
home: true
heroText: Hello VuePress v1
tagline: The official theme for your docs
features:
- title: Simplicity First
  details: Minimal setup helps you focus on writing.
- title: Vue-Powered
  details: Enjoy the dev experience of Vue + webpack.
- title: Performant
  details: Generates pre-rendered static HTML.
footer: MIT Licensed | Copyright © 2018-present My Name
---

# Welcome to My Docs

This is your home page content.
EOF

mkdir guide
cat > guide/README.md << EOF
# Guide

This is your guide page.

## Section One

Content for section one.

## Section Two

Content for section two.
EOF

cat > package.json << EOF
{
  "name": "my-docs",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "docs:dev": "vuepress dev",
    "docs:build": "vuepress build"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "vuepress": "^1.9.10",
    "@vuepress/theme-vue": "^1.9.10"
  }
}
EOF

npm run docs:dev

view raw JSON →