Get your Free Table of Contents
Compatible with the Copenhagen theme only
The Table of Contents extension finds headers in articles and automatically generates a list of links to those headers at the top of the article content. The extension works with usual HTML headers (h1, h2, h3, etc.).
Installation instructions
- Unzip the downloaded simple-toc.zip file.
- In Guide, click the Customize design icon in the sidebar.
- Click Customize on the theme you want to edit.
- Click Edit code.
- In the Files section, click Add new, then select Asset.
- Browse to select the simple-toc.js and simple-toc.css files.
- The asset files are added to your list of asset files.
- In the Templates sections, select the 'footer.hbs' template.
- Copy and paste the following lines to the end of the file:
<script src="{{asset 'simple-toc.js'}}"></script>
<script>
window.addEventListener('load', () => {
window.SimpleToC.init();
});
</script> - Click the Save button.