oreillymedia / asciidoctor-htmlbook

Templates for the htmlbook backend for Asciidoctor
45 stars 15 forks source link

Outline/TOC function clarification #90

Open sethwoodworth opened 9 years ago

sethwoodworth commented 9 years ago

@rdhyee and I are building ebooks from asciidoc sources. HTMLBook spec says to use <ol> but the default outline function outputs <ul>. @rdhyee patched this by overriding the outline ruby method.

In this issue from asciidoctor @mojavelinux suggests a better way of calling outline and shows how the <ul> behavior of asciidoc can be overridden.

mojavelinux commented 9 years ago

To be more specific, outline can be overridden just like any block using a template. There's no need to patch Asciidoctor to accomplish this customization (and best to stick with the template approach).

sethwoodworth commented 9 years ago

The patch was totally a hey-lets-hack-this-right-now solution. Templates are 110% preferred for our usecase.

mojavelinux commented 9 years ago

The patch was totally a hey-lets-hack-this-right-now solution.

To clarify, this wasn't possible before 1.5.0, so at the time it was probably the only way. I recognized this issue when working on 1.5.0 and rectified it so simplify cases just like this.