Skip to main content

Contributing to VitePress

We’re excited that you’re interested in contributing to VitePress! This guide will help you get started with contributing to the project.

Code of Conduct

VitePress has adopted the same Code of Conduct as the Vue.js project. Please read and follow it.

Ways to Contribute

Report Bugs

Help us identify and fix issues by reporting bugs you encounter.

Suggest Features

Share ideas for new features or improvements to existing ones.

Improve Documentation

Help make the docs better by fixing errors or adding examples.

Submit Code

Contribute bug fixes, new features, or performance improvements.

Development Setup

Pull Request Guidelines

Commit Message Convention

VitePress follows the Angular commit convention for automated changelog generation.

Format

Commit messages must match this pattern:

Structure

Types

Appears under “Features” in changelog:
Appears under “Bug Fixes” in changelog:
Appears under “Performance Improvements” in changelog:
Documentation changes:
Other valid types (won’t appear in changelog unless they have BREAKING CHANGE):
  • style: Code style changes (formatting, semicolons, etc)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks
  • build: Build system changes
  • ci: CI configuration changes
  • dx: Developer experience improvements

Scope

The scope specifies the area of change:
  • theme: Default theme changes
  • client: Client-side code
  • build: Build system
  • markdown: Markdown processing
  • search: Search functionality
  • etc.

Subject Guidelines

  • Use imperative, present tense: “change” not “changed” or “changes”
  • Don’t capitalize first letter
  • No period (.) at the end
  • Keep under 50 characters

Breaking Changes

If your commit includes breaking changes:

Examples

Testing Guidelines

Unit Tests

Located in __tests__/unit/:

E2E Tests

Located in __tests__/e2e/:

Init Tests

Tests for the vitepress init command:

Code Style

VitePress uses Prettier for code formatting:
Code is automatically formatted on commit via git hooks, so you usually don’t need to run these manually.

Project Structure

Development Workflow

Making a Bug Fix

Adding a Feature

Improving Documentation

Building VitePress

Development Build

Production Build

Build Documentation

Getting Help

If you need help contributing:

Recognition

All contributors are recognized in:
  • GitHub contributors list
  • Release notes for their contributions
  • The VitePress community
Thank you for contributing to VitePress! Every contribution, no matter how small, makes a difference.

License

By contributing to VitePress, you agree that your contributions will be licensed under its MIT License.