How to add a table of contents for Dawn theme?

I’m trying to add tocbot to my Dawn theme but it’s not working quite right.

The TOC is stuck to the left of the screen - not in the sidebar, I’m not sure that this theme has a sidebar? And the TOC doesn’t follow the reader all the way to the end of the post.

I’ve had success installing tocbot on other themes. Any help making it work right on Dawn?

Dawn doesn’t have a sidebar, exactly. It’s laid out with Grid, which for larger screens looks like this:

, but that big column that looks like it might be a sidebar collapses to almost nothing on smaller screens.

You could plausibly put the toc into the left or right side of the grid (probably setting it to span multiple rows), but you’re going to need @media queries to put it somewhere else (like the central column) when the screen is narrow. Alternately, you might look at a floating table of contents option that could hover over the side on big screens…

1 Like