The auto-generation of TOC wasn’t working because the “auto-linking header tags” described here doesn’t work if the file isn’t Markdown: https://github.com/hashicorp/middleman-hashicorp#auto-linking-header-tags