Photo by OpenArtAI

Automatic Table of Contents (Ghost CMS)

Guides Mar 18, 2025

Preface

The Ghost blogging platform is a great tool to use, however out of the box it doesn't come with all the bells and whistles I wanted. Although saying it doesn't come with the features I want, it's such an easy platform to build upon (even with my limited knowledge).

In a previous blog post "Securing Cloudflare Tunnels the easy way" I introduced a table of contents using the brilliant resources by Bright Themes.

Ghost Content Snippets
Reusable components for Ghost Themes. Add them once then reuse them in any post with a few clicks

Initially this was just by adding the HTML blocks in and manually updating them each time, which was simple enough but depending on the length of articles this could take considerable time especially when factoring in any changes to be made.

If we look at the below example, we now have an automatic table of contents that updates as we scroll and has links back to each section to jump to the content, pretty neat!.

At the time of writing this, this doesn't play all to well with Members Only posts

Tags

Mint

Manifest your best self!