Insert a local table of contents into a HTML page ¶ Friday, October 31, 2025. How to insert a local table of contents into a HTML page? Except for some basic examples I couldn’t find something that actually inserts the TOC in a marked place, complete with backlinks, and later updates that TOC. from difflib import Differ from lino.utils.soup import sanitized_soup TOC_MARKER = "=TOC_HERE=" html =…