It was written in Python. And was really just a rip-off of some other
plugin and I converted it to kramdown.
The original source is quoted in the docs.
nikola plugin install kramdown
Will, I believe, install it.
And then you can take a look at the source.
The problem might be related to the move from 2.7 to 3.
There is a blog entry on my site at:
About kramdown TOCs.
The site is very stale and I am currently re-publishing it. But the blog
post explains how to do TOC in kramdown.
I struggled a bit originally with what I could find online, hence the