asciidoctor / brackets-asciidoc-preview

Live Preview of AsciiDoc for Adobe Brackets
MIT License
51 stars 16 forks source link

Extensions and TOC #1

Closed anthonny closed 8 years ago

anthonny commented 10 years ago

Add asciidoctor_extensions.js Add parameter to active/inactive TOC Active anchor link in TOC

nerk commented 10 years ago

Hi Anthonny, thanks for the pull request. Unfortunately, I can't get it work, TOC is not showing.

Is this related to open issue https://github.com/asciidoctor/asciidoctor.js/issues/9 ? Maybe I'm missing something?

anthonny commented 10 years ago

No, it's not related with this issue. Can you try with this file : https://github.com/asciidoctor/atom-asciidoc-preview/blob/master/test.asciidoc

Have you a stack in your console.log ? I'll check more tonight.

nerk commented 10 years ago

OK, that worked just fine! Must be something else on my side then.

anthonny commented 10 years ago

Glad to read that it works !

mojavelinux commented 10 years ago

Since we are rendering embeddable HTML (header and footer disabled), the only toc placements that work are preamble and manual. Manual requires the use of the toc::[] macro somewhere in the document. The preamble placement only works if your document has a preamble (otherwise, there is no slot for it).

In Asciidoctor core, we probably need to rethink where we put the TOC. The current behavior was designed around compliance with AsciiDoc Python. We've outgrown that requirement :)

nerk commented 8 years ago

Version 1.1.6 implements a separate outline view for navigation as a sliding pullout menu. This is independent from any TOC settings.