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}} {{/if}}
<section class="gh-content gh-canvas"> <section class="gh-content gh-canvas">
{{!-- Adds table of contents unless instructed not to --}} <aside class="gh-sidebar">
{{^has tag="#hide toc"}} <div class="gh-toc"></div>
<aside class="gh-sidebar"> </aside>
<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}}
{{content}} {{content}}
@ -53,7 +40,18 @@
</section> </section>
</article> </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}} {{/post}}
</div> </div>
</main> </main>