提交 68d9e4b2 编写于 作者: U ULIVZ

chore: tweaks comments

上级 eec3048c
......@@ -2,7 +2,6 @@ const path = require('path')
const Plugin = require('../plugin-api')
const PluginContext = require('../plugin-api/context')
// built-in plugins
const lastUpdatedPlugin = require('../../packages/vuepress-plugin-last-updated')
const enhanceAppPlugin = require('../../packages/vuepress-plugin-enhance-app')
const registerGlobalComponentsPlugin = require('../../packages/vuepress-plugin-register-global-components')
......@@ -14,9 +13,9 @@ module.exports = function (options) {
const plugin = new Plugin(pluginContext)
plugin
// 1. user plugin
// user plugin
.useByConfigs(siteConfig.plugins)
// 2. built-in plugins
// built-in plugins
.use(enhanceAppPlugin)
.use(registerGlobalComponentsPlugin, {
baseDirs: [
......@@ -25,13 +24,13 @@ module.exports = function (options) {
]
})
// 1. whether to use active header links
// whether to use active header links
const { activeHeaderLinks = true } = themeConfig
if (activeHeaderLinks) {
plugin.use(activeHeaderLinksPlugin)
}
// 2. whether to use last updated
// whether to use last updated
const shouldUseLastUpdated = (
themeConfig.lastUpdated ||
Object.keys(siteConfig.locales && themeConfig.locales || {})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册