
Squarespace 7.1 — Sticky TOC Plugin
Just copy/paste this code into a new code block on any page/post.
*NOTE:
This won’t work properly if using another TOC plugin
This won’t show properly (on desktop) if using a custom sidebar in your site CSS
Check out the instructions below for information on edits and troubleshooting
📜 Sticky Table of Contents for Squarespace
Copy and paste this into a Code Block inside your Squarespace site. This will create a sticky table of contents that appears when scrolling down the page.
Looking for something else?
Check out my other TOC plugins:
📌 Squarespace Sticky Table of Contents Plugin – Quick Start Guide
This plugin creates a floating sticky table of contents on your Squarespace blog post, showing your H2s and H3s in a sleek, clickable format. It only appears after scrolling down the page.
On mobile, it stays at the top.
You can customize it easily with the tips below 👇
🧠 How to Add It
Edit your blog post.
Add a Code Block anywhere in the main content area.
Paste the entire TOC plugin code inside it.
Save & preview your post — scroll down and voilà!
🎨 Customize the Plugin
🔹 1. Change the Link Color
Want the links to match your site’s color scheme?
Find this line in the code:
css
CopyEdit
#toc-box a { color: #0070f3; }
Replace #0070f3
with any color you like (Hex, RGB, or blue
, hotpink
, etc.).
🔹 2. Push the TOC Box Further Down
Is your sticky header overlapping the TOC box?
Find this line:
css
CopyEdit
top: 140px;
Increase that number (e.g. top: 180px;
) to push the box further down.
🔹 3. Adjust the Alignment
Want to nudge the box away from the edge or float it right instead?
Find this line:
css
CopyEdit
left: 10px;
To move it more inward, increase the number.
To align it to the right instead, change it to:
css
CopyEdit
right: 10px; left: auto;
🛠️ Optional: Tweak the Box Width
If you want a slightly wider or skinnier box, change:
css
CopyEdit
width: 180px;
Try 160px
for a tighter look or 200px
if your headings are long.
⚠️ Troubleshooting
If the TOC overlaps your blog post content:
Hover near the blog content area in Squarespace Editor.
Click Edit Section.
Scroll to Content Width → choose Custom.
Adjust the width until there's enough space for your TOC box to float beside your content.
🙌 That’s It!
Once it's set up, your readers can easily jump to any section of your blog. Great for SEO, UX, and longer-form guides.