Getting Started
Welcome to your VitePress documentation site! This guide will help you get up and running quickly.
Installation
First, install the dependencies:
bash
npm installDevelopment
Start the development server:
bash
npm run docs:devThe site will be available at http://localhost:5173.
Configuration
The main configuration is centralized in site.config.js at the project root. This file contains:
- Site metadata: title, description, language
- Theme configuration: logo, navigation, social links
- Author information: name and email
Customizing Your Site
Edit site.config.js to customize your documentation site:
javascript
export default {
site: {
title: "Your Site Title",
description: "Your site description",
lang: "en-US",
base: "/",
},
theme: {
logo: "/logo.svg",
nav: [
{ text: "Home", link: "/" },
{ text: "Guide", link: "/guide/getting-started" },
],
socialLinks: [
{ icon: "github", link: "https://github.com/yourusername/yourproject" },
],
},
author: {
name: "Your Name",
email: "[email protected]",
},
}Project Structure
.
├── site.config.js # Centralized configuration
├── docs/
│ ├── .vitepress/
│ │ ├── config.mts # VitePress configuration
│ │ └── theme/ # Custom theme
│ ├── guide/ # Documentation guides
│ ├── examples/ # Example pages
│ ├── public/ # Static assets
│ └── index.md # Homepage
├── package.json
└── README.md