docs: 增加backToTop插件

This commit is contained in:
wanchun 2022-11-17 16:46:01 +08:00
parent 3660291e14
commit 907879eac5
2 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,9 @@
import { defineUserConfig } from '@vuepress/cli'; import { defineUserConfig } from '@vuepress/cli';
import { defaultTheme } from '@vuepress/theme-default'; import { defaultTheme } from '@vuepress/theme-default';
import { docsearchPlugin } from '@vuepress/plugin-docsearch'; import { docsearchPlugin } from '@vuepress/plugin-docsearch';
import { pwaPopupPlugin } from '@vuepress/plugin-pwa-popup' import { pwaPopupPlugin } from '@vuepress/plugin-pwa-popup';
import { pwaPlugin } from '@vuepress/plugin-pwa' import { pwaPlugin } from '@vuepress/plugin-pwa';
import { backToTopPlugin } from '@vuepress/plugin-back-to-top'
import { navbar, sidebar } from './configs'; import { navbar, sidebar } from './configs';
export default defineUserConfig({ export default defineUserConfig({
@ -87,6 +88,7 @@ export default defineUserConfig({
buttonText: '刷新', buttonText: '刷新',
}, },
}, },
}) }),
backToTopPlugin()
], ],
}); });

View File

@ -42,6 +42,7 @@
"@vuepress/plugin-docsearch": "2.0.0-beta.53", "@vuepress/plugin-docsearch": "2.0.0-beta.53",
"@vuepress/plugin-pwa": "2.0.0-beta.53", "@vuepress/plugin-pwa": "2.0.0-beta.53",
"@vuepress/plugin-pwa-popup": "2.0.0-beta.53", "@vuepress/plugin-pwa-popup": "2.0.0-beta.53",
"@vuepress/plugin-back-to-top": "2.0.0-beta.53",
"@webank/eslint-config-webank": "^1.2.3", "@webank/eslint-config-webank": "^1.2.3",
"chokidar": "^3.5.2", "chokidar": "^3.5.2",
"commitizen": "^4.2.1", "commitizen": "^4.2.1",