-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsciiDoc table of contents is not rendered #80
Comments
add this entry to jbake.properties
asciidoctor.org is by default in mode 1 or 2 where TOC creation is disabled. |
Unfortunately, adding |
There is an explicit attribute in the AsciidoctorJ library for |
TOC is working for me. For reference and example check the source of my website here at github. |
Just had a look at your site source and it looks like the toc only gets rendered if you explicitly add |
Great, with Also, with this explicit |
Apparently, |
Layout features depend on the underlying theme/backend. Yet there is no asciidoctor bootstrap theme/backend available. You can see what could be possible at http://laurent-laville.org/asciidoc/bootstrap/manual/current/en/ but unfortunately this is not compatible with asciidoctor. |
Wait, I just found this asciidoctor theme https://github.com/nerk/asciidoctor-bs-themes. Seems that someone already made the first step. Tobias @lefou if you try it out could you post us your feedback. |
Sure, I will do if I find the time. For now, I can (and have to) live with the current result. |
I'm checking with the Asciidoctor project on this. |
Actually, the table is rendered, if the following two attributes are set: :toc:
:toc-placement: preambe Notice, that the default value for Now, if you have a non-empty preamble, you will see the TOC. No need to place the So, one issue is the no-TOC-in-non-preamble problem, which might be caused by a conflict between bootstrap and asciidoctor css, as pointed out before. For the other issue, no-TOC-if-preamble-is-empty, maybe some Asciidoctor(J) dev can help? |
Thanks for following this up with more research. Even if there was a conflict in the CSS, Asciidoctor should still render the HTML for the toc in the source regardless. Just to confuse matters the Asciidoctor CLI will render the toc as expected. Here's the discussion on this with the Asciidoctor project: http://discuss.asciidoctor.org/TOC-output-using-AsciidoctorJ-td1300.html |
TOC output seems to have changed again with the release of Asciidoctor v1.5.0 (#144) however I think I've narrowed it down to the difference in behaviour between render & renderFile methods of the Asciidoctor API. |
AsciiDoc table of contents is not rendered in my .adoc page on GitHub Enterprise. I tried toc::[] and i tried :toc: ... still no TOC. Is there a text processor involved in the displaying of an adoc file in GitHub/Enterprise? If so, perhaps the AsciiDoctor processor on our Version of GitHub Enterprise needs to be upgraded to support TOCs ...? Just guessing. Any thoughts guys? |
@richnsoos what Version of Jbake are you using? see my example in #144 for jBake 2.3.2 |
Not sure, but great question. @roderickrandolph or @busse might know. |
@richnsoos Do you have some text in your preamble, or is it empty. The two lines only work, if your preamble is non-empty. |
@lefou - I sorted it out. It was user error. My toc::[] line was not free standing. It was "connected" to the header so it did not get processed appropriately. As soon as I put a new line above toc::[], it worked. Thanks. |
As of Asciidoctor v1.5.x the suggested way to include the TOC is:
For more info see: http://discuss.asciidoctor.org/TOC-output-using-AsciidoctorJ-tp1300p2312.html |
I dont pretend to understand what all this is, or what jbake is for that matter, but the TOC stuff is still 'broken' in github public. Thx for workaround! |
if I am using only :toc: macro, then I get a ToC at the left side of the doc - so toc::[] not needed, but without 'macro' value it is not rendered |
It used to work like this:
However, it stopped working recently with a silent update of github platform 👎 |
GitHub upgraded to Asciidoctor v1.5.2 recently: https://twitter.com/mojavelinux/status/628344681672241152 See above for solution: #80 (comment) |
As of 2016-02-23, i looked at the examples here to make my TOC work: My exact lines to make TOC work was this: ##CUT AND PASTE BELOW THIS LINE## Any questions regarding the API can be sent to /dev/null. Note that the TOC dit NOT appear if i left out the last line "Any questions...". |
A AsciiDoc table of contents is not generated, when
:toc:
is used.See http://asciidoctor.org/docs/user-manual/#user-toc.
JBake version is 2.2.1-SNAPSHOT, 7be8a72
The text was updated successfully, but these errors were encountered: