DiscoTOC - automatic table of contents


You can hide the Automatic header links anchor with

.anchor {
  display: none;

Hi dodesz,

I made the post width much larger than the default one, and after install this component it looks something wrong, could you tell me how to fix this problem?

:heart: thanks!

1 Like

On a forum running Discourse 2.8.0.beta4 (90232af778), including the DiscoTOC component leads to an error message:

The component had been activated before and raised an issue with the previously installed Discourse version as well, although I cannot say which version that was.

Are you able to find any error messages related to the issue in your site’s error logs?

That error message is a backend error, while DiscoTOC is a front-end theme-component so it’s hard for those to be related. Do you have any plugins installed?

1 Like

Unfortunately, I couldn’t find anything useful in the /logs.

I do, here’s the relevant excerpt from app.yml:

    - exec:
        cd: $home/plugins
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-openid-connect.git
          - git clone https://github.com/discourse/discourse-checklist.git
          - git clone https://github.com/discourse/discourse-push-notifications.git
          - git clone https://github.com/discourse/discourse-characters-required.git
          - git clone https://github.com/angusmcleod/discourse-news.git
          - git clone https://github.com/discourse/discourse-data-explorer.git
          - git clone https://github.com/DNOeV/discourse-watch-category.git
          - git clone https://github.com/discourse/discourse-footnote.git
          - git clone https://github.com/discourse/discourse-knowledge-explorer.git

When a header is within a quote, the header doesn’t show up in the TOC. Could this behavior be changed?

This header won’t show up in TOC

Quoted content

This header DOES show up in TOC

Quoted content

I don’t know how it is planned to work but normally no because it’s part of quote, not a heading of that text.

1 Like

Could you try using the html <blockquote> instead? That would allow the header # to be at the start of a line.



### Anchor Header


Anchor Header

I’ve not tried it in a TOC, but it seems to work with the auto-anchor-headers in a regular post.

Why do you want headers within quotes to show up in the TOC? What’s your use case?

Thank you for the idea. It didn’t work for me, though.

Here’s an example of when I use quotes to visually structure content starting under Issue Area: Age


Why are you using quoting like that? Telling source is enough. Plus grammatically that is wrong, in english too.

Is this a bug or just another user, but… how should I close the TOC? I was looking for some basic instructions how an enduser should use private messages and of course I went to new users doc and opened the TOC to see if there is some info.

I was using iPad and DiscourseHub.

I got this:

The TOC is just fine. But it is overlapping text and I coudn’t get is suppress back. So what the heck I did wrong, or didn’t at all :pleading_face:

I wonder if the ToC does work on those ToS, FAQ, Privacy pages which run from the Discourse links like /tos and /privacy?
For me I don’t see the ToC there, but on the page in the matching category with the same content it is shown again.


This component is wonderful! But is there any way to batch-add a ToC to many topics at once? I have 130 topics that I’d like to use this with…

Also, I wonder if it could pick up numbered and perhaps even bulleted text? Perhaps not… they’d often have a lot of text next to them, cluttering the ToC.

1 Like

Brilliant. Thanks for sharing! :+1::clap:

1 Like

@Johani Just installed this, works perfectly and it is super useful. And thanks for not letting this meme die, lol.


I’ve got this problem too, but it only occurs on some posts. It doesn’t seem to be a conflict with other TCs or plugins, and I can’t see anything when inspecting it via the browser that would explain it:



Is it possible to not only have the headings from the first but all posts in the toc since we are looking to implement this plugin for story threads where each chapter is posted separately alongside with comments of other users


Has anyone else noticed that the posts with the TOC are scrolled down slightly when the page loads?