DiscoTOC - automatic table of contents

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.

3 Likes

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.

4 Likes

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:

image

2 Likes

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

3 Likes

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

4 Likes

I’ve noticed this. Always thought it was me touching my (sensitive) scroll wheel.

3 Likes

Not that you would know, but do you think that would be a css issue or a scripting issue? I forked the repo and have been trying to find the cause, I find it very annoying.

1 Like

In your image did you also have more than one anchor on the right side like in this image?

I notice that this issue appears for me when more than one anchor is present, and I’m wondering if the extra anchors are pushing the rest of the post slightly more to the left, or at least making toc wider than it’s supposed to be, which forces the sticky avatar to pop above, and then consequently overlap when you scroll down.

2 Likes

Yes, but it seems to disappear when I reload the page (most of the time). So it is a little hard to reproduce reliably.

1 Like

I’m seeing the same behaviour. Maybe this is only an issue for the person authoring/editing the post?

1 Like

I believe you can repro if you edit the post, save… and you’ll have the double double anchor issue . . .

1 Like

I also get the malalignment on an unedited topic, but without the anchor problem:

3 Likes

Thanks for creating this wonderful plugin!

I’m getting a server 500 error on trying to update DiscoTOC.

Have just updated discourse, and going through any themes, etc that are flagged as having updates. This list includes DiscoTOC.

I tried a manual update via he UI, but it fails with a server error 500. So enabled “auto-update” and restarted the machine. Discourse fails to start. Then tried rebuilding the container → discourse doesn’t build/won’t start.

Starting the container manually and deleting DiscoTOC via the UI gets everything working again… but now we have no DiscoTOC (:frowning: )

I have also tried downloading as a zip file from github and got the same issue.

I don’t see anything obvious in the logs that I’ve looked at.

Any suggestions for what to try?

Thanks in advance!

2 Likes

Hi Julian,

Sorry you’re having trouble. I just updated my self-hosted site to see if I can replicate your problem and am able to update without any issues, so perhaps a recent refactor to discotoc @pmusaraj has been working on is conflicting with one of your other plugins or theme components?

Can you try to test some more by reinstalling DiscoTOC, and then looking at the page with the javascript cosole open? If you see any errors there, please let us know here. Also can you check your /logs for any errors that correspond to the times when you are getting the 500 error?
Cheers,

Tobias

2 Likes

Can you install any theme components @kiwikid? The error you’re seeing likely has little to do with DiscoTOC, it sounds to me like your instance can’t install components at all. (Also, I just removed and reinstalled DiscoTOC on a test instance, and it worked just fine.)

For the record, I am going to merge a PR that changes a lot of the internals of the component in the next few hours/days.

6 Likes

Thanks for the quick response @pmusaraj. Before posting I successfully added a couple of themes. Just added Topic Stopwatch in case something is broken/different re theme components. That installed cleanly with no issues. Also added the Kanban addon that was in the automatic “popular” list with no issues.

I also tried installing the DiscoTOC refactor branch last night and had the same issue.

I Used https://github.com/discourse/DiscoTOC as the URL and manually set the branch name from master → main.

All it gives me is a server error 500 :frowning:

Trying the two year old branch marks-testing installs fine (!)

Dashboard shows Discourse version is 2.8.0.beta11 (cbf99f48d8).

Plugins installed and active: discourse-chat-integration, discourse-voting, discourse-formatting-toolbar, discourse-graphviz, discourse-hot-topics, discourse-math, discourse-solved, discourse-user-notes, discourse-whos-online, docker-manager. Also styleguide plugin is installed but not active.

Let me know if there’s any other info I can collect to help debug this!

3 Likes

Anything in /logs? These 500s should have more details in logs.

2 Likes


Hello Joe,
I wonder why table of content not Full right display!
What did i do wrong? So, can you fix for me? Thank you!

2 Likes