# pnpm pnpm add -D vuepress-plugin-components # npm npm i -D vuepress-plugin-components # yarn yarn add -D vuepress-plugin-componentsvuepress-theme-hope 的组件。安装# pnpm pnpm add -D vuepress-plugin-components # npm npm i -D vuepress-plugin-components # yarn yarn add -D vuepress-plugin...
菜单高亮 名称:@vuepress/plugin-active-header-links 效果:页面滚动时自动激活侧边栏链接的插件,效果就是右边内容滚动的时候,看到哪里了,左侧菜单会自动高亮显示当前看的目录。 安装 自带主题不用安装 yarn add -D @vuepress/plugin-active-header-links # OR npm install -D @vuepress/plugin-active-header-links...
"vuepress-plugin-baidu-tongji": "^1.0.1", "vuepress-plugin-demo-block": "^0.7.2", "vuepress-plugin-one-click-copy": "^1.0.2", "vuepress-plugin-thirdparty-search": "^1.0.2", "vuepress-plugin-zooming": "^1.1.7", "vuepress-theme-vdoing": "^1.8.1", "yamljs": "^0.3.0" }, ...
在vuepress1.0的components目录下,默认会以文件名注册全局组件,如果是文件夹会是默认以文件夹名+文件名注册组件名 在2.0中,需要引入注册组件插件@vuepress/plugin-register-components 代码语言:javascript 代码运行次数:0 运行 AI代码解释 const { registerComponentsPlugin } = require('@vuepress/plugin-register-component...
$ yarn add @vuepress/plugin-register-componentscopy Try in RunKit· Browse Files CDNs jsDelivr cdn.jsdelivr.net/npm/@vuepress/plugin-register-components/ unpkg unpkg.com/@vuepress/plugin-register-components/ bundle.run bundle.run/@vuepress/plugin-register-components Popularity GitHub stargazers 22,755...
例如,你可以使用@vuepress/plugin-register-components插件来自动注册Vue组件。首先,在你的VuePress项目中安装该插件: npm install -D @vuepress/plugin-register-components 然后,在.vuepress/config.js配置文件中添加以下内容: module.exports = { plugins: [ ...
demo-1.vue ├─ OtherComponent.vue └─ Foo └─ Bar.vue 你可以直接使用这些组件在任意的 Markdown 文件中(组件名是通过文件名取到的):<demo-1/><OtherComponent/><Foo-Bar/> 那我们就在 .vuepress 文件夹下新建一个 components 文件夹,然后创建一个 LastUpdated.vue 文件,代码为:<templa...
.├──vuepress_blog│├──.vuepress││├──components││├──theme│││└──Layout.vue││├──public││├──styles│││├──index.styl│││└──palette.styl││├──templates│││├──dev.html│││└──ssr.html││├──config.js(重要)││└──enhanceApp.js│││...
步骤1: 安装 @vuepress/plugin-register-components 插件 1 yarn add @vuepress/plugin-register-components@next -D 步骤2:config.js中配置修改如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
1.2 当前 Vue 实例的扩展,提供了代码注入(inject)、实例混入(mixin)、组件拓展(components)、路由拓展(routes)方式。 2. 服务端部分 2.1 构建流程,这部分暴露出了 webpack、webpack-dev-server、markdown-it、动态模块的配置。 2.2 用户文件,包括配置文件和 markdown 文件(文档),这些文件相当于站点的元数据。 2....