Skip to content

Commit

Permalink
Configure TOC from _config, wrap TOC title and TOC in a div
Browse files Browse the repository at this point in the history
  • Loading branch information
snomos committed Sep 3, 2024
1 parent d02dd3d commit 6f7838b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ description: <a href="/AboutGiellaLT.html">GiellaLT</a> provides an infrastructu

plugins:
- jemoji

toc:
enabled: true
h_min: 2
h_max: 6
8 changes: 6 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ <h1><a href="{{ "/" | absolute_url }}">{{ site.title | default: site.github.repo
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
</ul>
{% endif %}
<h2 class="tocheader">Page Content</h2>
{% include toc.html html=content sanitize=true class="left_toc" id="left_toc" h_min=2 %}
{% if site.toc.enabled %}
<div id="toc">
<h2 class="tocheader">Page Content</h2>
{% include toc.html html=content sanitize=true class="left_toc" id="left_toc" h_min=site.toc.h_min h_max=site.toc.h_max %}
</div>
{% endif %}
</header>
<section>

Expand Down

0 comments on commit 6f7838b

Please sign in to comment.