Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
145 posts
|
Hi,
When I use jekyll + asciidoctor, I discover strange side effects. By example the table of content can only be render if I use the following attribute in the asciidoctor page and set attribute - toc in the _config.yaml file toc::[] but the following syntax in my page does not change the title of the TOC : toc::[] :toc-title:Chapters It is rendered kie that i nthe page :toc-title:Chapters Regards, Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
Charles, It's important to understand that the Jekyll plugin (like the Awestruct integration) renders the AsciiDoc to embeddable HTML (no HTML header or footer). The embeddable HTML does not include the outer layout where the TOC is normally inserted. This, you have to use the toc::[] macro to manually insert the TOC in the HTML output. That should explain why you see different behavior. When you define attributes such as toc-title, they must be declared before their use. Try to switch the order of the lines, preferably putting toc-title into the document header, and see if that works out for you. Note that the document header consists of lines at the top of the document *before* a blank line (just like an email). For example: ```asciidoc toc::[] Remaining content here. -Dan On Oct 7, 2013 7:20 AM, "ch007m [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hi, ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
In reply to this post by ch007m
I should clarifying that in the Awestruct integration, AsciiDoc is rendered to embeddable HTML if a layout is specified (using the page-layout attribute). If no layout is specified, the AsciiDoc document is rendered to a standalone HTML file. I don't think this distinction is made in the Jekyll plugin, but ideally it should be. -Dan On Oct 7, 2013 5:40 PM, "Dan Allen" <[hidden email]> wrote:
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
In reply to this post by ch007m
On Oct 7, 2013 5:43 PM, [hidden email] wrote: I should clarify... (Stupid keyboard autocomplete) -Dan |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
145 posts
|
Thx for to clarify the point Dan.
that works better now using this syntax : ``` --- layout: default title: GPE - Fuse Training Offering documentationExpanded: false postsExpanded: false :toc-title: Chapters :toc2: right --- = Camel Training Charles Moulliard 2013-10-06 toc::[] ```
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
145 posts
|
What I copy/paste in my previous post was not correct. here is the syntax used :
``` = Camel Training Charles Moulliard 2013-10-06 :toc-title: Chapters :toc2: right toc::[] ```` Question : Is there a toc macro to render toc2, ... as toc2::[] does not work ?
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
Charles, Aha. I forget to mention about how the toc is rendered (and specifically in the embeddable HTML). The various options for toc position don't really move the toc at all. What's really changing is the CSS. The sidebar toc (i.e., toc2) gets assigned an extra class that relies on CSS to move it to the left or the right. The HTML is no different.
The default Asciidoctor stylesheet does not honor the left and right toc position when the toc macro is used (call it a feature enhancement). Without the default stylesheet, styling of the toc is entirely up to the site author.
Fortunately, it's not too difficult to shift the toc to the right or left by adding custom CSS to your site's stylesheet: .Left TOC ```css
body { padding-left: 20em; padding-right: 0; } #toc { position: fixed; width: 20em; left: 0; top: 0;
z-index: 1000; padding: 1em; height: 100%; overflow: auto; } ``` .Right TOC ```css body { padding-left: 0; padding-right: 20em; } #toc { position: fixed; width: 20em; right: 0; top: 0;
z-index: 1000; padding: 1em; height: 100%; overflow: auto; } ``` -Dan
On Tue, Oct 8, 2013 at 7:42 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote: What I copy/paste in my previous post was not correct. here is the syntax used : ... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
145 posts
|
Thx Dan. That could be interesting that the toc::[] becomes something that we could personalized with attributes example --> toc::[title -> 'MyTitle', position -> 'right']
On Tue, Oct 8, 2013 at 10:27 PM, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
... [show rest of quote] Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Free forum by Nabble | Edit this page |