1.0.4 • Published 3 years ago

vuepress-sidebar-atuo v1.0.4

Weekly downloads
21
License
ISC
Repository
-
Last release
3 years ago

前言:

vuepress需要手动设置侧边栏、导航栏,导入大量笔记就很费时间。为了能够专心写作而不用去管侧边栏、导航栏的引入,读取大量资料,改进了下面函数

下载

npm i vuepress-sidebar-atuo

引入

const {getChildren} = require("vuepress-sidebar-atuo")

使用

module.exports = {
        '/views/': [
        {
            title: '基础知识',
            collapsable: true,
            children: getChildren('./docs/views/basis/')
        },
        {
            title: '高级进阶',
            collapsable: true,
            children: getChildren('./docs/views/advanced/')
        },
         '/jottings/':[
        {
            title: '随笔',
            collapsable: true,
            children: getChildren('./docs/jottings/')
        },
    ],
    //...
`这样就配置完成了`

排序

-文件名格式 不设置则排最后 数值越小,越靠前

xxxxx-01, xxxxx-02, xxxxx-03 ...

查看效果--->

源码 github

效果 malunan的blog

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago