strapdown
strapdown copied to clipboard
TOC in navbar
Much needed improvement, I believe.
Could you add a Table Of Content in right end of a "navbar" / topbar?
It should be invisible (only some tiny indicator, something like dimmed arrow pointing down), but when you hover over it, some dropdown menu should emerge.
It should be automatically generated from H2 (or more) tags.
You've got the picture :)
BTW: I see no reason, other than this, for this top-navbar.
Thanks.
Anyway - great idea. I made a plugin for Sublime Text 2 to use it as Markdown Preview.
hey, good idea - would love to take a look at a pull request... :)
I've hacked to join an existing JQuery-TOC-plugin into Strapdown, which shows a TOC (h1...h5) below the navbar
Have a look in my repo: https://github.com/zipizap/strapdown_template
What's the syntax for a table of contents? Is it a MarkDown "standard?"
@jamiejackson: it's not a Markdown standard, because what Markdown does is to convert text-to-html without a TOC.
The TOC idea as I see it, would be a complement to the markdown-generated-html-page:
- first generate with Markdown the html-page
- then parse the html-page for all existing h1..h5, and automatically create (with javascript) a TOC section, and put it in the top of the html-page
Hope it clarifies, that the TOC is not a Markdown-thing, it's a post-Markdown "addon" :)
It's clearer to me now, thanks. I was thinking that there was some small bit of placeholder/toggle syntax, similar to WikiText's "TOC".
Any chances to push it upstream?