{"id":1579,"date":"2023-03-25T19:26:07","date_gmt":"2023-03-25T11:26:07","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1579"},"modified":"2023-04-27T21:31:14","modified_gmt":"2023-04-27T13:31:14","slug":"a-plugin-for-automatically-generating-sidebar-groups-for-vuepress","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/a-plugin-for-automatically-generating-sidebar-groups-for-vuepress\/","title":{"rendered":"\u4e3aVuePress\u81ea\u52a8\u751f\u6210\u4fa7\u8fb9\u680f\u5206\u7ec4\u7684\u63d2\u4ef6"},"content":{"rendered":"<p>Github\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/github.com\/shanyuhai123\/vuepress-plugin-auto-sidebar\">https:\/\/github.com\/shanyuhai123\/vuepress-plugin-auto-sidebar<\/a><br \/>\n\u6587\u6863\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/\">https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/<\/a><\/p>\n<p>\u63d2\u4ef6\u7684\u53ef\u9009\u9879\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/features\/plugin-options.html\">https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/features\/plugin-options.html<\/a><br \/>\n\u7cbe\u51c6\u6392\u5e8f\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/features\/markdown-file-config.html#\u7cbe\u51c6\u6392\u5e8f\">https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/features\/markdown-file-config.html#\u7cbe\u51c6\u6392\u5e8f<\/a><br \/>\n\u591a\u4e2a\u5206\u7ec4\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/features\/markdown-file-config.html#\u591a\u4e2a\u5206\u7ec4\">https:\/\/shanyuhai123.github.io\/vuepress-plugin-auto-sidebar\/features\/markdown-file-config.html#\u591a\u4e2a\u5206\u7ec4<\/a><\/p>\n<p><!-- more --><\/p>\n<pre><code class=\"language-javascript\">module.exports = {\n  plugins: {\n    &quot;vuepress-plugin-auto-sidebar&quot;: {\n      collapsable: true,\n      sidebarDepth: 2,\n    }\n  }\n}<\/code><\/pre>\n<h2>\u5e38\u89c1\u95ee\u9898\uff1a\u4fa7\u8fb9\u680f\u663e\u793a\u7684\u662f\u6587\u4ef6\u8def\u5f84\uff0c\u800c\u975e\u6587\u4ef6\u540d<\/h2>\n<p>\u8fd9\u662f\u7531\u4e8e md \u6587\u4ef6\u4e2d\u7f3a\u4e4f\u6807\u9898\u5bfc\u81f4\u7684\uff0c\u6807\u9898\u7684\u4ea7\u751f\u6709\u4e24\u79cd\u65b9\u5f0f:<\/p>\n<p>\uff081\uff09\u6dfb\u52a0 <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/v1.vuepress.vuejs.org\/zh\/guide\/frontmatter.html#front-matter\" title=\"Front Matter\">Front Matter<\/a> \u7684 title \u5c5e\u6027\uff08\u63a8\u8350\uff09<\/p>\n<pre><code class=\"language-bash\">---\ntitle: \u6807\u9898\n---<\/code><\/pre>\n<p>\uff082\uff09markdown \u8bed\u6cd5\u4e2d\u7684\u6807\u9898<\/p>\n<pre><code class=\"language-bash\"># \u4e00\u7ea7\u6807\u9898\n## \u4e8c\u7ea7\u6807\u9898<\/code><\/pre>\n<h2>\u6587\u4ef6\u540d\u5982\u4f55\u5d4c\u5957\u591a\u7ea7\u6807\u9898<\/h2>\n<blockquote>\n<p>\u6ce8\uff1atitle \u5c5e\u6027\u76f8\u5f53\u4e8e\u4e00\u7ea7\u6807\u9898\uff0c\u5982\u679c\u8bbe\u7f6e title \u5c5e\u6027\uff0c\u6b63\u6587\u5e94\u4ee5\u4e8c\u7ea7\u6807\u9898\u4e3a\u6700\u9876\u7ea7\u6807\u9898<\/p>\n<\/blockquote>\n<p>\u914d\u7f6e\u5168\u5c40\u7684 depth\uff0c\u5982\u679c\u4f60\u5e0c\u671b\u914d\u7f6e\u67d0\u4e2a\u6587\u4ef6\u7684 depth \u4fee\u6539\u6587\u4ef6\u5185\u7684 <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/v1.vuepress.vuejs.org\/zh\/theme\/default-theme-config.html#\u5d4c\u5957\u7684\u6807\u9898\u94fe\u63a5\" title=\"sidebarDepth\">sidebarDepth<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Github\uff1ahttps:\/\/github.com\/shanyuhai123\/vuepress-plugin- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[395],"class_list":["post-1579","post","type-post","status-publish","format-standard","hentry","category-vue","tag-vuepress"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1579"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1579\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}