Closed ezietsman closed 10 years ago
The reason this isn't working is because of the content algorithm that Tocify uses (referenced in #46 ). If you change the h1.title This is an activity title
from being a header, it should work as you expect.
Here is a good read to understand it more: http://developers.whatwg.org/sections.html#headings-and-sections
And a good quote from that article:
The first element of heading content in an element of sectioning content represents the heading for that section. Subsequent headings of equal or higher rank start new (implied) sections, headings of lower rank start implied subsections that are part of the previous one. In both cases, the element represents the heading of the implied section.
Hi,
I have some documents I want to use tocify on. I'm having trouble to get tocify to use the elements I want. The document looks as follows:
In which case the toc should look like:
and the div.activity > h1 should be ignored.
I've tried to use the selectors option in various ways e.g.
and
but it won't give the correct ToC. Can tocify do what I want? If not can you give me some pointers as to what I can do to add this functionality and send a pull request?