It would be nice if we could have a render template for TOCs so it was easy to modify the html output.
Found myself writing some css to target by element id yesterday, the first custom css I’ve written in a project I’ve been working on for a couple of weeks. Yuk.
My preferred output would drop the id, add a class and an aria-label attribute at a minimum, for improved semantics and UAT UX.
Now that .Fragments exists that is true. I think long term the ‘internal’ templates might be better held as a separate repository. This would make it more obvious they were ‘just’ templates, make them easier to find, separate template maintenance from Hugo core, and make them easier to replace with one’s own versions.
In any event I think there is a general reluctance to adding new internal templates, and in fact a wish to reduce how many there are, with the feeling that some (many?) of the templates don’t really belong in core now, even though it made sense early in Hugo’s development.