@vuepress/plugin-nprogress (opens new window)

一个基于 nprogress (opens new window) 的进度条插件。

安装

yarn add -D @vuepress/plugin-nprogress
# 或者 npm install -D @vuepress/plugin-nprogress

使用

module.exports = {
  plugins: ['@vuepress/nprogress']
}

自定义颜色

在你的 sitethemepalette.styl 文件中设置 $nprogressColor 来改变进度条的颜色(默认使用 $accentColor)。

// .vuepress/styles/palette.styl
// 或者
// .vuepress/theme/styles/palette.styl

$nprogressColor = red

参考: