Fixed missing table of contents

This commit is contained in:
Jean Viscogliosi-Pate 2024-08-31 21:52:37 -07:00
parent 9ea42fa3aa
commit 9eced82e93
1 changed files with 15 additions and 17 deletions

View File

@ -23,22 +23,9 @@
{{/if}}
<section class="gh-content gh-canvas">
{{!-- Adds table of contents unless instructed not to --}}
{{^has tag="#hide toc"}}
<aside class="gh-sidebar">
<div class="gh-toc"></div>
</aside>
<script src="{{asset "js/lib/tocbot.min.js"}}"></script>
<script>
tocbot.init({
tocSelector: '.gh-toc',
contentSelector: '.gh-content',
headingSelector: 'h1, h2',
hasInnerContainers: true,
});
</script>
{{/has}}
<aside class="gh-sidebar">
<div class="gh-toc"></div>
</aside>
{{content}}
@ -53,7 +40,18 @@
</section>
</article>
{{!-- Adds table of contents unless instructed not to --}}
{{^has tag="#hide toc"}}
<script src="{{asset "js/lib/tocbot.min.js"}}"></script>
<script>
tocbot.init({
tocSelector: '.gh-toc',
contentSelector: '.gh-content',
headingSelector: 'h1, h2',
hasInnerContainers: true,
});
</script>
{{/has}}
{{/post}}
</div>
</main>