2021-12-07 09:53:48 +03:00
|
|
|
{% assign enable_toc = false %}
|
2021-12-01 16:48:57 +03:00
|
|
|
{% if site.toc and page.toc %}
|
2021-12-07 09:53:48 +03:00
|
|
|
{% if page.content contains '<h2' or page.content contains '<h3' %}
|
|
|
|
{% assign enable_toc = true %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if enable_toc %}
|
2024-04-28 22:36:16 +03:00
|
|
|
<section id="toc-wrapper" class="d-none ps-0 pe-4">
|
|
|
|
<h2 class="panel-heading ps-3 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
|
2023-03-15 21:56:54 +03:00
|
|
|
<nav id="toc"></nav>
|
2023-09-08 17:48:37 +03:00
|
|
|
</section>
|
2021-12-01 16:48:57 +03:00
|
|
|
{% endif %}
|