Bearblog CSS: Table of Contents
anarchaeopteryx.bearblog.dev·15w
  • 2025-10-22 *

How to generate and insert a table of contents into your bearblog posts and some responsive styling for it.

A Table of Contents is one of the first things I made and styled when I started using Bearblog so I could insert it into my weekly digest posts. I have tweaked it a lot of times since then, and probably will continue to tweak it. It is simply a div with a header and a nested list.

The styling features:

  • Responsive margins and padding that makes the list more compact on smaller screen sizes.
  • Different markers for different levels of nested lists, e.g. 1. i. a.
  • Takes up about half the body width on wide screens, but takes up the whole width of the body on smaller screens (responsive margin-right...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help