VitePressBlog

vitepress-nav-template — VitePress Blog Template

By maomao1996

A personal front-end navigation page template built on VitePress, with a built-in navigation module, support for day/night mode, visitor statistics and giscus comments, and deployment to platforms such as GitHub Pages.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-08View source

What stands out

A quick read of the recorded project description.

01

Built on VitePress, with a Chinese interface by default

02

Includes a front-end navigation module and adds layout-class for easier custom styling

03

Supports adaptive switching between day and night color modes

04

Supports visitor statistics and giscus comments, with comments that can be disabled on specified pages

05

Supports tailwindcss and allows viewing the source code of Vue example components

06

Supports direct deployment to GitHub Pages, with README instructions for Netlify, Vercel and Cloudflare Pages

Template Details

This is a front-end navigation page template built with VitePress, created by maomao1996, with the repository under the MIT license. The template defaults to a Chinese interface, includes a front-end navigation module, and adds layout-class for custom styling.

In terms of features, the template supports adaptive switching between day and night color modes, visitor statistics and giscus comments; comments can be disabled on specified pages via comment: false in the frontmatter. It supports tailwindcss and, with vite-plugin-markdown-preview, provides the ability to view the source code of Vue example components. For deployment, it supports going live directly on GitHub Pages, and the README also provides build configurations for third-party services such as Netlify, Vercel and Cloudflare Pages (build command npm run build, output directory dist, Node version 20 or higher).

Before use, note the following: local startup requires Node.js 20 or higher, with corepack enabled and dependencies installed using pnpm; the local service port is 8732. Visitor statistics and giscus comments require configuring the visitor and comment fields respectively in themeConfig in docs/.vitepress/config.ts. If GitHub Pages uses a custom domain, APP_BASE_PATH in .github/workflows/deploy.yml must be changed to /. The licenses of third-party assets such as demo images, fonts and icons must be checked separately, and external services such as domains and hosting may incur additional charges.

VitePressBlog

Is it right for your project?

Use Cases

  • Building a personal front-end navigation page to organize frequently used site links in one place
  • Using it as a VitePress site template to extend with blog or documentation content
  • Deploying to GitHub Pages or platforms such as Netlify, Vercel and Cloudflare Pages for public access
  • Adding GitHub Discussions-based comments to pages through giscus

Suitable For

  • Developers who need a personal front-end navigation page
  • Users familiar with or willing to use VitePress and pnpm
  • Those who want to deploy the navigation page to GitHub Pages or third-party static hosting platforms
  • Site authors who need basic capabilities such as day/night mode switching, visitor statistics and comments

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Local startup requires installing Node.js 20 or higher and running corepack enable

  2. 2

    Install dependencies with pnpm install, start the local service with pnpm dev, and visit http://localhost:8732

  3. 3

    Visitor statistics require configuring badgeId in themeConfig.visitor in docs/.vitepress/config.ts

  4. 4

    giscus comments require filling in repo, repoId, category and categoryId in themeConfig.comment according to the content generated by giscus.app

  5. 5

    When GitHub Pages uses a custom domain, APP_BASE_PATH in .github/workflows/deploy.yml must be changed to /

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean that external services or third-party assets are free.

Must comply with when using

  • The code of this version may be used, modified, used commercially and distributed free of charge.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments or AI may incur additional charges.
  • When using or drawing on the front-end navigation module, retain the copyright notice of the author maomao and indicate the source repository link.
  • The visitor statistics feature requires configuring badgeId in themeConfig.visitor in docs/.vitepress/config.ts before it can be enabled.
  • The giscus comment feature requires filling in repo, repoId, category and categoryId in themeConfig.comment in docs/.vitepress/config.ts before it can be enabled.
  • If GitHub Pages is bound to a custom domain, APP_BASE_PATH in .github/workflows/deploy.yml must be changed to /, otherwise the deployment path will be incorrect.
  • Local operation requires installing Node.js 20 or higher; lower versions may not build correctly.
  • Before installing dependencies, run corepack enable to enable the package manager.
  • Dependencies must be installed with pnpm install, not npm or yarn.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

前端导航模块由 [茂茂 | maomao](https://github.com/maomao1996) 开发,如有引用、借鉴的请保留版权声明:<https://github.com/maomao1996/vitepress-nav-template>

Original README

需在 `docs/.vitepress/config.ts` 中配置 `themeConfig.visitor`

Original README

需在 `docs/.vitepress/config.ts` 中配置 `themeConfig.comment`

Original README

当 Github Pages 使用自定义域名时,需要修改 `.github/workflows/deploy.yml` 脚本中的 `APP_BASE_PATH` 为 `/`

Original README

1. 下载并安装 [Node.js](https://nodejs.org/zh-cn/download) 推荐 20 版本及更高版本

Original README

2. 开启 `corepack enable`

Original README

3. 安装依赖 `pnpm install`

Original README
https://github.com/maomao1996/vitepress-nav-template/blob/main/LICENSEhttps://github.com/maomao1996/vitepress-nav-template/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-08. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 83 / 100
Technologies
VitePress
Website type
Blog
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-03-12
Screenshot last checked
2026-10-08

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies VitePress as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-08

Inspect the recorded source material

SHA-256: e8d59952bedf294d5e08a18cc9c2ae5f5be72ec3235deda47dcc004284d72d61

2026-10-08T12:37:36.527Z

Source file / repository
# vitepress-nav-template

<p align="center">
  <img src="https://raw.githubusercontent.com/maomao1996/picture/main/vitepress-nav-template/home.webp" alt="home" />
</p>
<p align="center"> 基于 <b>VitePress</b> 的个人前端导航页面模板 </p>
<p align='center'><a href="/guide.md">基础教程</a> | <a href="https://notes.fe-mm.com/">作者博客</a></p>

---

## 预览地址

- <https://fe-nav.netlify.app/nav/>
- <https://maomao1996.github.io/vitepress-nav-template/nav/>

## 功能

- 新增 `layout-class` 方便更好的自定义样式
- 默认中文
- 自带前端导航模块
- 支持访客统计
- 支持 [giscus 评论](https://giscus.app/zh-CN)
- 支持日夜颜色模式自适应切换
- 支持 Github Pages 直接部署上线
  - 1. 开启 github actions
  - 2. 配置 Pages 的 Branch 为 `gh-pages` 分支,文件夹为 `/(root)`
  - 3. 访问地址为 `https://<username>.github.io/<repository>/` 或自定义域名
- 支持 [tailwindcss](https://github.com/tailwindlabs/tailwindcss)
- 支持查看 vue 示例组件源码(使用 [vite-plugin-markdown-preview](https://github.com/jaskang/vite-plugin-markdown-preview))

## 本地启动

1. 下载并安装 [Node.js](https://nodejs.org/zh-cn/download) 推荐 20 版本及更高版本
2. 开启 `corepack enable`
3. 安装依赖 `pnpm install`
4. 启动本地服务 `pnpm dev`
5. 访问 `http://localhost:8732` 查看效果

#### 使用自定义域名部署

当 Github Pages 使用自定义域名时,需要修改 `.github/workflows/deploy.yml` 脚本中的 `APP_BASE_PATH` 为 `/`

更**推荐使用第三方服务绑定域名来部署**

- [Netlify](https://www.netlify.com/)
- [Vercel](https://vercel.com/)
- [Cloudflare Pages](https://pages.cloudflare.com/)

使用仪表板创建新项目并更改这些设置:

- **构建命令:** `npm run build`
- **输出目录:** `dist`
- **node 版本:** `20` (或更高版本)

更多部署指南请查看 [VitePress 各平台部署指南](https://vitepress.dev/zh/guide/deploy#platform-guides)

### 开启访客统计

需在 `docs/.vitepress/config.ts` 中配置 `themeConfig.visitor`

```ts
export default defineConfig({
  themeConfig: {
    /* 访客统计 */
    visitor: {
      /** 统计 id(单独页面的统计会作为前缀使用)*/
      badgeId: 'maomao1996.vitepress-nav-template',
    },
  },
})
```

### 开启 giscus 评论

需在 `docs/.vitepress/config.ts` 中配置 `themeConfig.comment`

```ts
export default defineConfig({
  themeConfig: {
    /**
     * giscus 评论配置
     *  请根据 https://giscus.app/zh-CN 生成内容填写
     */
    comment: {
      /** github 仓库地址 */
      repo: '',
      /** giscus 仓库 ID */
      repoId: '',
      /** Discussion 分类 */
      category: '',
      /** giscus 分类 ID */
      categoryId: '',
    },
  },
})
```

#### 在指定页面关闭评论

需在指定页面的 `markdown` 文件中添加如下 `frontmatter` 配置

```md
---
comment: false
---

# 功能测试页
```

docs: 更新 README

## 说明

前端导航模块由 [茂茂 | maomao](https://github.com/maomao1996) 开发,如有引用、借鉴的请保留版权声明:<https://github.com/maomao1996/vitepress-nav-template>
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.