-
Notifications
You must be signed in to change notification settings - Fork 7
Description
If you do something like this in kramdown...
1. TOC
{:toc}
It will render a table of contents, with a default ID of 'markdown-toc'. Unfortunately, you end up with a numbered list, but it doesn't sub-number the list (2.2, 2.3 ... )like Wikpedia does, nor does it give it that nice 'Content' header either.
The kramdown option can be put in an include called 'toc', so you'll just have to do
{% include toc %}
on each and every page. It doesn't appear that you can add that to a layout.
Otherwise, we could add a nice javascript module that autocalculates a TOC and puts it on the page somewhere. Given our extensive use of javascript elsewhere, and the fact that we can really extend this, it's probably the best choice... but I'll have to think about this, there are merits on both sides.
Others are welcome to weigh in on this.