I seem to be missing the anchor links next to the headings, which allowed me to link to a specific section directly, for instance in this topic, like described in the start post:
Is this me or did this functionality disappear?
Users are discussing missing anchor links next to headings in topics using DiscoTOC. RGJ noticed anchors are missing in some topics like Beginners Guide to Using Discourse Themes, though they appear in others. JammyDodger confirmed anchors can be accessed via long-press on mobile. RGJ clarified the issue affects TOC-enabled topics without anchors, while others like Discourse API Documentation do have them. pmusaraj explained the root cause: DiscoTOC previously added custom anchors for HTML headings (<h3>, etc.), but core Discourse now auto-generates anchors only for Markdown headings (e.g., ###). The guide topics used HTML, so anchors disappeared after DiscoTOC’s custom logic was removed. RGJ thanked pmusaraj for clarifying. JammyDodger acknowledged oversight and updated the example topics to use Markdown headers, resolving the issue.
I seem to be missing the anchor links next to the headings, which allowed me to link to a specific section directly, for instance in this topic, like described in the start post:
Is this me or did this functionality disappear?
They should be there? I’m currently on my phone, but I grabbed this one by long-pressing on the gap to the side of the heading:
https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143#how-does-it-work-3
Yes, that topic has those anchor links, but that’s a topic that does not have the DiscoTOC.
But this topic has a TOC and does not have anchors: Beginner's guide to using Discourse Themes and this one does not have anchors either Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)
EDIT Hmm…this topic does have anchors: Discourse REST API Documentation
Ah, I can explain. The topic you linked has html headings (<h3>, <h4> and so on) and initially the TOC component had its own logic for adding heading anchors. However, since then, core added automatic anchors and recently I removed the custom anchor login in the theme component. However, core’s anchor feature only works for Markdown headings (using ###).
So that’s the OP here has anchors, but the linked guide doesn’t.
We probably should update that guide to use Markdown instead of HTML @JammyDodger.
Ah! That explains things perfectly, thanks Penar!!
I was clearly not paying enough attention yesterday.
I have now swopped in Markdown headers for the two example topics. ![]()