I just ran a bunch of updates on one site where I use this plugin. The table of contents didn't show up any more, and after some digging now I found out that toc(page.content) simply returns empty. I have no idea why, I already took other plugins out of the equation. What could be the issue here?
I put this bit in my base.html.twig template (and it used to work like this):
{% set table_of_contents = toc(page.content) %}
{% if table_of_contents is not empty %}
<h2 id="headline-toc">Auf dieser Seite:</h2>
{{ table_of_contents|raw }}
{% endif %}
Many thanks for your help!
I just ran a bunch of updates on one site where I use this plugin. The table of contents didn't show up any more, and after some digging now I found out that
toc(page.content)simply returns empty. I have no idea why, I already took other plugins out of the equation. What could be the issue here?I put this bit in my
base.html.twigtemplate (and it used to work like this):{% set table_of_contents = toc(page.content) %}{% if table_of_contents is not empty %}<h2 id="headline-toc">Auf dieser Seite:</h2>{{ table_of_contents|raw }}{% endif %}Many thanks for your help!