Refactor TOC conditionals (#3358)
It inserts TOC if non provided and auto TOC is enabled for distill layout
This commit is contained in:
parent
cef2ac090c
commit
07a7af3db6
@ -67,7 +67,7 @@
|
||||
{% endif %}
|
||||
|
||||
<d-article>
|
||||
{% if page.toc %}
|
||||
{% if page.toc and page.toc.size > 0 %}
|
||||
<d-contents>
|
||||
<nav class="l-text figcaption">
|
||||
<h3>Contents</h3>
|
||||
@ -87,7 +87,16 @@
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</d-contents>
|
||||
|
||||
{% elsif page.toc == true %}
|
||||
<d-contents>
|
||||
<nav class="l-text figcaption">
|
||||
<h3>Contents</h3>
|
||||
{% toc %}
|
||||
</nav>
|
||||
</d-contents>
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
</d-article>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user