0.1.2 • Published 3 years ago
vuepress-plugin-child-toc v0.1.2
vuepress-plugin-child-toc
Display child page table of content on your vuepress documentation
Requirements
- This plugin requires VuePress >= 1.0.0.
Features
Add a <ChildTableOfContents />
component that you can use in your markdown in order to get a Table of Contents for all the child page (meaning url starting with the current page url).
Install
npm i vuepress-plugin-child-toc
Usage
Using this plugin:
// .vuepress/config.js
module.exports = {
plugins: ['vuepress-plugin-child-toc']
}
then add your table of components where you want in your markdown pages:
# All child page table of contents
<ChildTableOfContents />
# All child page table of contents with max 2 max distance level
<ChildTableOfContents :max="2"/>
# Add internal, anchor link in the table of contents
<ChildTableOfContents :header="true"/>
# Display Child TOC for this specific page
<ChildTableOfContents pageUrl="/blogs/"/>
Inspiration
Largely inspired from plugin vuepress-plugin-global-toc