Member-only story

Automatically Generating A Table Of Contents For Your Medium Article

synapticloop
12 min readJul 18, 2022

--

Or… With a bit of jiggery pokery through Tampermonkey and Firefox (although Tampermonkey supports most browsers), you can automatically generate a list of the headings — which can then be easily formatted into a table of contents.

A Table of Contents is like index cards at a library — make it easy to find content — Photo by Ryunosuke Kikuno on Unsplash

Update

I have tried to get this to work on the Mobile app — but it does not — sorry.

Looking for a Chrome Extension to lookup the best topics for your Medium story — look no further — it is FREE and easy to use.

TL;DR¹

An automatic way of finding all of the headings in your medium article, in order, and automatically inserted into the page.(If you want to see updates to the code — just follow me on medium)

Step 1: Download/Install Tampermonkey for your Browser (https://www.tampermonkey.net/)
Step 2: Go to the Tampermonkey Menu → click on Create a new script... (A new table should open
Step 3: Copy and past this code into the window: https://gist.github.com/synapticloop/b397e976b5218881325598ba9d273d9d
Step

--

--

synapticloop
synapticloop

Written by synapticloop

IT // Writer // 🫶 Got 30 seconds? Support my daughter's writing https://synapticloop.medium.com/piper-e0e565e266c7 🫶

No responses yet