Allow the [TOC] macro in Markdown'ed READMEs (BB-739)

Issue #1465 resolved
Steve Losh
created an issue

The current version of Django and python-markdown support the {{{[TOC]}}} macro to insert a table of contents. This is really handy for larger READMEs.

Here's an example of how I use it on my site:

Comments (12)

  1. John St. John

    Actually, it looks like this already works! I put [TOC] on it's own line in the main for my repository, and it rendered as a bulleted list with links to the other sections in my file.

  2. Roger Davies

    Hi all, We were just testing this functionality too - particularly one that included a hierarchy for complex wiki's - would be great if this could be automated. Testing the markdown version it seems to build okay for the current page. In case this helps, the Crole markdown version in particular does seem to run and - according to the documentation will take a 'path' and 'depth' variable - but seems only to run on the current page and immediate page below it whatever we place here.

    We found a few offline type solutions for auto building a TOC, as another option, but as other users have said this would be a really useful feature if it's possible - even if it means the user re-running this macro when the Wiki changes, rather than attempting to render and then cache each time

  3. Log in to comment