Closed jaswrks closed 9 years ago
This would be something awesome to have in s2Clean, too!
This has been implemented. I also updated the YAML Front Matter article to include a new field that can be used to control this behavior (toc-enable:
). There is also a new default config. option for this in the Dashboard with additional instructions.
cc @raamdev There's not much to this. Basically, you just add headers (either in raw HTML or with Markdown) and a TOC is generated automatically by the WPKBA plugin.
If you want to disable it globally you can do that from the Dashboard. Or, you can control it on a per-article basis (no matter what the global config. option is), by adding a YAML config. field: toc-enable: true|false
in a specific article.
Of course, an article with no headings will already be bypassed on the TOC generation.
Woohoo! Awesome! I love it.
I've created a new KB Article for this: Automatically Generating a Table of Contents (TOC)
Eventually it would be nice if WP KB Articles could support an automatic Table of Contents generator that would be based on
<h[0-9]>
tags found in the article body.