---
title: "HubSpot Table of Contents Module: Auto Table of Contents, Free"
description: A free HubSpot table of contents module. Builds its list from the headings in your blog post or page, clears sticky headers and works on phones.
image: https://allgusto.com/hubfs/brand-2026/products/auto-table-of-contents/launch/01-sidebar-current-section.png
---

[Skip to content](https://allgusto.com/hubspot-apps-and-themes/hubspot-table-of-contents#main)

[![All Gusto](https://allgusto.com/hs-fs/hubfs/All%20Gusto%20-%20Logo%20-%20Black%20-%20Transparent-1.png?width=340&height=226)](https://allgusto.com/)

- [Home](https://allgusto.com/)
- [About](https://allgusto.com/about)
- [Apps and Themes](https://allgusto.com/hubspot-apps-and-themes)
- [Blog](https://allgusto.com/blog)
- [Contact](https://allgusto.com/contact-us)

# HubSpot table of contents module

Your long posts already have the sections. Now readers can see them.

[See the demo](https://toc.allgusto.com/toc-showcase)

A long blog post on HubSpot usually has a good structure that readers cannot see. The headings are there, but there is no list at the top, so people scroll, guess and leave. Adding one by hand means typing anchor links for every section and fixing them every time the post changes. Auto Table of Contents is a free HubSpot module that builds the list from the H2, H3 and H4 headings already on the page. Clicks land below your sticky header, the section in view is highlighted, and on phones the list opens from a small button. You can see it on a [live demo](https://toc.allgusto.com/toc-showcase) in three styles, in light and dark, before you install it.

## Who it is for

I built this module for teams that publish long posts, guides and resource pages on HubSpot and want readers to find the section they came for. It works on blog posts, website pages and landing pages, and it is not tied to a theme. If you run a blog, the simplest setup is to place it once in your blog post template and set a minimum number of headings, so long posts get a list and short ones do not.

## What it does

The module reads the headings in the post body, or in the part of the page you point it at, and builds a nested list. It adds an ID only to headings that have none and keeps the IDs you already link to, so shared links keep working. Pick which heading levels to include, and leave out headings by CSS class or by text, such as Related posts or Subscribe.

You choose one of three layouts. Inline puts a box in the article. Sticky sidebar pins the list in the side margin on wide screens, so it stays in reach as the reader scrolls. Floating pins a compact panel. On screens under 720px wide, a small On this page button opens the list in a drawer, or you can keep the list in the article.

As the reader scrolls, the section in view is highlighted and marked for screen readers. You can add nested numbering (1, 1.1, 1.2), a reading progress bar, a Collapse button, or start the list collapsed. Clicking a link, or opening a shared link to a section, puts the heading just below your sticky or fixed header. The module finds the header for you, or you can enter an offset.

Colors come from the page, so the box matches light and dark themes with no settings. Every label is a field, so it works in any language. To restyle it, use the module's class names and CSS custom properties; the three demo styles are page CSS only.

## Page weight and layout shift

The JavaScript is one file of about 5.2 KB gzipped as HubSpot serves it, and the CSS is about 2.4 KB, with no libraries and nothing loaded from another server. On blog posts, the module counts the headings on the server and reserves the list's height before the page paints, so the article does not jump when the list appears. On the demo pages, measured cumulative layout shift is 0.0002 or less. Reduced motion settings turn off smooth scrolling and transitions.

## What it does not do

I would rather you know the limits before you install it.

It does not work in HubSpot knowledge base articles, because the knowledge base does not use CMS themes or drag and drop modules. It needs JavaScript to build the list, and with JavaScript off the box stays hidden rather than showing an empty title. On drag and drop website pages, the module cannot see the rest of the page on the server, so it cannot reserve the list's height ahead of time. It lists headings. It does not add search, FAQ blocks or structured data.

## Setup order

| Step | What you do | Why it comes here |
| --- | --- | --- |
| 1 | Install the module from the HubSpot Marketplace | It has to be in your account before you can place it |
| 2 | Check your headings: one H1, then H2 and H3 in order | The list mirrors your headings, so it is only as clear as they are |
| 3 | Place it in your blog post template, or drag it into one post or page | The template puts it on every post at once |
| 4 | Set Show only with at least 3 headings | Short posts skip the box and keep no empty space |
| 5 | Pick a layout and a mobile presentation | Sidebar suits wide article pages; inline suits narrow ones |
| 6 | Publish and click three links on the live page | Confirms each heading lands below your header |

## Frequently asked questions

### Does it work on blog posts?

Yes. Drag it into the post body where your blog template allows modules there, or place it once in the blog post template so every post gets it.

### Do I have to add anchor links to my headings?

No. The module adds IDs to headings that do not have one and leaves existing IDs alone.

### Will it fight my sticky header?

No. Auto mode finds a header pinned to the top of the screen and lands each heading just below it. If your header changes height as you scroll, set a manual offset.

### Will it slow my pages down?

The JavaScript is about 5.2 KB gzipped with no libraries, and the module loads nothing from another server.

### Can I change how it looks?

Yes. It takes its colors from your page. For more, target its class names and CSS custom properties from your theme CSS. The demo shows three different styles made that way.

### How does support work?

Email info@allgusto.com. I reply within one business day. If you want it styled to your site or placed across your templates, I can do that as a separate project.

## Get Auto Table of Contents

Auto Table of Contents is free on the HubSpot Marketplace.

[See the live demo](https://toc.allgusto.com/toc-showcase)

© 2026 All Gusto, LLC

- [Home](https://allgusto.com/)
- [About](https://allgusto.com/about)
- [Apps and Themes](https://allgusto.com/hubspot-apps-and-themes)
- [Gatehouse member portal theme](https://allgusto.com/hubspot-apps-and-themes/gatehouse-member-portal)
- [Events Calendar and Agenda module](https://allgusto.com/hubspot-apps-and-themes/events-calendar-and-agenda)
- [Blog](https://allgusto.com/blog)
- [Contact](https://allgusto.com/contact-us)
- [Privacy](https://allgusto.com/privacy)
- [Terms](https://allgusto.com/terms)

```json
{
  "@context" : "https://schema.org",
  "@type" : "SoftwareApplication",
  "applicationCategory" : "BusinessApplication",
  "description" : "A free HubSpot table of contents module. Builds its list from the headings in your blog post or page, clears sticky headers and works on phones.",
  "name" : "Auto Table of Contents",
  "offers" : {
    "@type" : "Offer",
    "availability" : "https://schema.org/InStock",
    "price" : "0",
    "priceCurrency" : "USD"
  },
  "operatingSystem" : "HubSpot CMS",
  "publisher" : {
    "@type" : "Organization",
    "name" : "All Gusto",
    "url" : "https://allgusto.com/"
  },
  "url" : "https://allgusto.com/hubspot-apps-and-themes/hubspot-table-of-contents"
}
```

```json
{
  "@context" : "https://schema.org",
  "@type" : "FAQPage",
  "mainEntity" : [ {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Yes. Drag it into the post body where your blog template allows modules there, or place it once in the blog post template so every post gets it."
    },
    "name" : "Does it work on blog posts?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "No. The module adds IDs to headings that do not have one and leaves existing IDs alone."
    },
    "name" : "Do I have to add anchor links to my headings?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "No. Auto mode finds a header pinned to the top of the screen and lands each heading just below it. If your header changes height as you scroll, set a manual offset."
    },
    "name" : "Will it fight my sticky header?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "The JavaScript is about 5.2 KB gzipped with no libraries, and the module loads nothing from another server."
    },
    "name" : "Will it slow my pages down?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Yes. It takes its colors from your page. For more, target its class names and CSS custom properties from your theme CSS. The demo shows three different styles made that way."
    },
    "name" : "Can I change how it looks?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Email info@allgusto.com. I reply within one business day. If you want it styled to your site or placed across your templates, I can do that as a separate project."
    },
    "name" : "How does support work?"
  } ]
}
```

```json
{
  "@context" : "https://schema.org",
  "@type" : "BreadcrumbList",
  "itemListElement" : [ {
    "@type" : "ListItem",
    "item" : "https://allgusto.com/",
    "name" : "Home",
    "position" : 1
  }, {
    "@type" : "ListItem",
    "item" : "https://allgusto.com/hubspot-apps-and-themes",
    "name" : "Apps and Themes",
    "position" : 2
  }, {
    "@type" : "ListItem",
    "item" : "https://allgusto.com/hubspot-apps-and-themes/hubspot-table-of-contents",
    "name" : "Auto Table of Contents",
    "position" : 3
  } ]
}
```