一款基于 VuePress 二次开发的主题---VPX

1,017 阅读1分钟

介绍

1、vuepress-theme-vpx 是一个 VuePress 二次开发的主题,在默认主题基础上做了些扩展功能

2、扩展功能主要以归档文章,页脚栏定制化为主

3、集成 IconPark 图标库 和 Waline 评论

4、面向简洁的文档网站用户群体使用

5、项目仓库:GiteeGitHub

6、文档: vuepress-theme-vpx | 效果:青春永不落幕

快速上手

在使用之前,你需了解 VuePress 默认主题配置,方可使用

安装主题

使用 yarn 安装 VPX 主题:

yarn add -D @vuepress/bundler-webpack@next // vuepress 打包工具
yarn add -D @vuepress/cli@next // vuepress 配置文件
yarn add -D @qcyblm/vuepress-theme-vpx@next // VPX 主题

package.json 中添加一些 scripts

{
  "scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs"
  }
}

引用主题

创建 .vuepress/config.ts 文件,然后再合适的位置复制引用它:

import { defineUserConfig } from '@vuepress/cli'
import type { VpxThemeOptions } from '@qcyblm/vuepress-theme-vpx'

export default defineUserConfig<VpxThemeOptions>({
    theme: '@qcyblm/vpx',
})

配置完成后,你可使用 scripts 快捷指令 yarn docs:dev 预览网站,yarn docs:build 进行打包你的网站静态文件

预览图

qcyblm.gitee.io_vuepress_.png

qcyblm.gitee.io_vuepress_ (1).png