Skip to content

VitePress Blog

A simple blog built with VitePress, maintained through Markdown files.

Installation

bash
npm install

Development

Start the development server:

bash
npm run docs:dev

The blog will be available at http://localhost:5173

Build

Build the static site:

bash
npm run docs:build

The built files will be in the .vitepress/dist directory.

Preview

Preview the production build:

bash
npm run docs:preview

Adding New Blog Posts

  1. Create a new .md file in the blog/ directory
  2. Add the post to the sidebar in .vitepress/config.mjs
  3. Update the blog index in blog/index.md if desired

Project Structure

docs/
├── .vitepress/
│   └── config.mjs       # VitePress configuration
├── blog/
│   ├── index.md         # Blog posts listing
│   └── welcome.md       # Example blog post
├── index.md             # Home page
├── about.md             # About page
├── package.json         # Project dependencies
└── .gitignore          # Git ignore rules

Customization

  • Edit .vitepress/config.mjs to customize the site title, navigation, sidebar, and theme
  • Modify the Markdown files to change the content
  • Add custom CSS or JavaScript in .vitepress/theme/ for advanced customization

Released under the MIT License.