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 %}
|
{% endif %}
|
||||||
|
|
||||||
<d-article>
|
<d-article>
|
||||||
{% if page.toc %}
|
{% if page.toc and page.toc.size > 0 %}
|
||||||
<d-contents>
|
<d-contents>
|
||||||
<nav class="l-text figcaption">
|
<nav class="l-text figcaption">
|
||||||
<h3>Contents</h3>
|
<h3>Contents</h3>
|
||||||
@ -87,7 +87,16 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</nav>
|
</nav>
|
||||||
</d-contents>
|
</d-contents>
|
||||||
|
|
||||||
|
{% elsif page.toc == true %}
|
||||||
|
<d-contents>
|
||||||
|
<nav class="l-text figcaption">
|
||||||
|
<h3>Contents</h3>
|
||||||
|
{% toc %}
|
||||||
|
</nav>
|
||||||
|
</d-contents>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</d-article>
|
</d-article>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user