You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started to use this to build my Hugo site with this. As I understand it, Hugo parses the outputted HTML to get the table of contents and excludes it from the HTML. It is extracted to a variable so that themes can make more better use out of it.
After switching to the html5s backend, I noticed the toc is printed on integrate into third-party projectsthe page itself and it seems that Hugo is not able to parse it from the HTML. I suspect Hugo expects to find the toc in some specific type of an element and the way html5s outputs it is not compatible.
Output from stock html5 backend
<divid="toc" class="toc"><divid="toctitle">Table of Contents</div><ulclass="sectlevel1"><li><ahref="#_note">Note!</a></li><li><ahref="#_support">Support</a></li><li><ahref="#_usage">Usage</a></li></ul></div>
Output from html5s backend
<navid="toc" class="toc" role="doc-toc"><h2id="toc-title">Table of Contents</h2><olclass="toc-list level-1"><li><ahref="#_note">Note!</a></li><li><ahref="#_support">Support</a></li><li><ahref="#_usage">Usage</a></li></ol></nav>
Now, I'm not sure wether this is a Hugo issue or what but I thought I'd start here since one of the goals of the project is to integrate into third-party projects. I'm hoping to find some kind of configuration that allows Hugo to get the toc from the output of html5s.
The text was updated successfully, but these errors were encountered:
I recently started to use this to build my Hugo site with this. As I understand it, Hugo parses the outputted HTML to get the table of contents and excludes it from the HTML. It is extracted to a variable so that themes can make more better use out of it.
After switching to the html5s backend, I noticed the toc is printed on integrate into third-party projectsthe page itself and it seems that Hugo is not able to parse it from the HTML. I suspect Hugo expects to find the toc in some specific type of an element and the way html5s outputs it is not compatible.
Output from stock html5 backend
Output from html5s backend
Now, I'm not sure wether this is a Hugo issue or what but I thought I'd start here since one of the goals of the project is to integrate into third-party projects. I'm hoping to find some kind of configuration that allows Hugo to get the toc from the output of html5s.
The text was updated successfully, but these errors were encountered: