Table of Contents for Posts and Themes

We are happy to announce the release of Table of Contents (TOC) in Hyvor Blogs.

Why TOC?

Until now, authors had to manually add a Table of Contents to their posts. This is error-prone as they can miss some headings. And, they also had to manually edit them every time the headings changed. Our new Table of Contents feature allows you to build an index of the headings in your posts automatically.

In Posts

Adding a Table of Contents to the top of your posts will make it easier for your readers to navigate to each section. It will also give a quick summary of the post to help readers understand the content better.

Use the / command to add a “Table of Contents” to your blog posts.

Within the post editor, the Table of Contents view will display all the headings for the selected levels.

Fix your missing heading IDs directly in the TOC view.

Screen Recording 2024-02-22 at 18.48.18

Finally, you will see the Table of Contents in your blog.

In Themes

You can also render a Table of Contents block in your themes using the toc helper.

{{ _post.content | toc }} 

With this new feature, we’ll be able to integrate TOCs to our official themes much easily. See the toc Twig filter for more information.

If you have any feedback, feel free to let us know!