I’m not convinced there would be much value to a render hook for the Table of Contents (TOC), primarily due to the limitations of the existing .TableOfContents
method.
The right way to generated a TOC is after the HTML has been written to the public directory.