I have a separate heading at end of my post for Further reading
, which I don’t want to show up in the TOC.
The heading is normally defined with markdown as level 4 heading
#### Further reading
content...
Presently, the heading shows up in my TOC normally like other headings. I don’t expect that behaviour since my TOC template code is supposed to show only 2 levels of headings. (I might be wrong with this part)
In LaTeX, I can omit a specific heading from TOC by using aesterix (eg \section*{Further reading}
)
Is something similar possible with Zola?
TOC template code from page.html
{% if page.toc %}
<a onclick="toggle('toc-custom')">Toggle table of contents</a>
<div id="toc-custom" style="display:none">
<h3>Contents</h3>
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<hr>
{% endif %}