a post with table of contents on a sidebar

This post shows how to add a table of contents as a sidebar.

Adding a Table of Contents

To add a table of contents to a post as a sidebar, simply add

toc:
  sidebar: left

to the front matter of the post. The table of contents will be automatically generated from the headings in the post. If you wish to display the sidebar to the right, simply change left to right.

Example of Sub-Heading 1

Example of another Sub-Heading 1

Customizing Your Table of Contents

If you want to learn more about how to customize the table of contents of your sidebar, you can check the bootstrap-toc documentation. Notice that you can even customize the text of the heading that will be displayed on the sidebar.

Example of Sub-Heading 2

Example of another Sub-Heading 2