简体   繁体   中英

VuePress extended markdown-it TOC

I'm using [[toc]] in my README.md file and it displays level 2, 3 (##, ###) headlines in the Table of Contents automatically. If I try to change this in my config file according to the documentation

toc: { includeLevel: [1, 2] },

it doesn't show any change? Is there an error in VuePress?

You need to pass the parameters like this:

md.use(require("markdown-it-table-of-contents"), {
    includeLevel: [1, 2]
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM