fix: added _includes

This commit is contained in:
2023-06-25 18:14:18 +09:00
parent ebc9c3bc2a
commit ac692a911d
33 changed files with 1708 additions and 0 deletions

13
_includes/toc.html Normal file
View File

@@ -0,0 +1,13 @@
{% assign enable_toc = false %}
{% if site.toc and page.toc %}
{% if page.content contains '<h2' or page.content contains '<h3' %}
{% assign enable_toc = true %}
{% endif %}
{% endif %}
{% if enable_toc %}
<div id="toc-wrapper" class="ps-0 pe-4 mb-5">
<div class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</div>
<nav id="toc"></nav>
</div>
{% endif %}