DiscoTOC - automatic table of contents

Interesting - I just checked again and am still seeing the same problem on my iphone. So we need to identify what distinguishes our iOS devices. :slight_smile: I am on iOS 12.2, iPhone 7 plus, using chrome version 74.0.3729.155. I just checked safari and see it works on safari on the same device.

1 Like

I’m on iPhone 6s, iOS 12.3.1.
I tried this on Safari and it worked!
I tried this on the Chrome app and it’s not working there.


The TOC in the link above works for me on Chrome iOS, I’m on 12.4 (but doubt that matters). Do you have any specific plugins/content blockers set up on your phone’s Chrome app?

I do not believe I have any specific plugins/content blockers on my phone’s Chrome app (not sure how to add any, actually!) How do I double-check?

I also completely re-installed my Chrome app and still no luck. I also tried it on the Google app and that didn’t work, either.

I have a problem here: Supported storage backends - How-to - Duplicacy Forum

The ### Snapshot Pruning header is missing from the TOC. Also (on a second look) it seems ### S3 and Billing is missing as well (just above #### Short Version).

1 Like

[bug report]

And a few more problems on https://forum.duplicacy.com/t/backup-command-details/1077#example.

  1. Scrolling a topic does not expand the TOC straight away, it can be seen when starting to scroll over Options and TOC is not expanded

  2. If there are multiple headings with the same name, selecting a link takes me to the wrong heading, since the headings aren’t unique. (see all the ##### Example headings at my link above.
    (if you click example under -dry run you are still taken to the first example heading).

    • Could the generated IDs have something like #previous_heading_Current_Heading or #current_heading-[insert new number here] ? I think this should fix it


Hey, I think this plugin is really great, but can I give an opinion?
The directory is now shrinking by default, but I want the directory to expand by default. Can you improve this feature? thank you very much

1 Like

[bug report]

The TOC should not show the number of clicks if the header is a link.
It happens: Scripts and utilities index - How-to - Duplicacy Forum

I don’t know what i’m doing wrong but it seems that the anchors generated by DiscoTOC no longer take me to the specific (sub-) heading, but are stripped and i’m taken to the top of the page when accessed from my own forum.

Here’s a sample link: https://forum.duplicacy.com/t/scripts-and-utilities-index/1104#duplicacy-utils-contributed-by-thebestpessimist. which works when clicked from here (meta).

The same link does not work from our forum: Does this DiscoTOC link work? - Site Feedback - Duplicacy Forum

Could someone please point me to what is going on here?

Update: After further testing it seems that (on my forum) the anchor is saved if i open a new tab (eg. middle-click on link), but not if i left click.

I think this is less a “bug” and more a “known issue”. You’re expecting alot from this theme component if you want to include markdown hyperlinks and @ mentions in headings that then become links in the automatically generated table of contents.

It would be pretty amazing if DiscoTOC could parse out the markdown within headings, but I have accepted that it does not and have worked around it. I do not put any markdown on headings in topics with a table of contents.


On an iphone the Table of Contents shows up, but when you click on any link in the TOC, it doesn’t bring you anywhere. Just a dead link. Works fine on desktop. Anyone else have a problem with the links in the TOC not working on mobile?

I am a beginner. I did not understand this part.

I want to have something like this

  1. first line
    1.1 first first line
  2. second line

How do i write these three headings

# first line

## first first line

# second line
1 Like

Thanks @Steven, I got it.

2_But there is strange behavior
The first line is <div data-theme-toc="true"> </div>. So, I am not able to insert hashtag heading in the next line. I have to go one line further below. This creates two lines space between name of user and first line of the topic.

Why so?

Thanks, I got the synatx.

Anybody figure out how to get this to work on an iPhone? The links in the TOC don’t work on iphone.

Hi Joe, when I link to a heading from a separate forum post, the post doesn’t automatically scroll to the appropriate heading. Could you take a look?

https://discourse.nycedu.org/t/how-do-we-document-organizational-policies-meeting-minutes-and-project-updates/195#how-do-we-document-project-updates will open correctly from this forum.

But it won’t from a different page on my own forum.

See “project management updates” link at


interesting. the link from within your forum seems to have the anchor stripped from it.

I checked on my site and have repro.

1 Like

Interesting - just updated today and getting this scary warning across the top. But the site seems to be fine so far.

:warning: Your site may not work because theme / component DiscoTOC has errors. Disable it at /admin/customize/themes.


DiscoTOC theme/component is throwing errors
Error: Could not find module ember-addons/ember-computed-decorators
    at https://DISCOURSE/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:1:554211
    at require (https://DISCOURSE/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:1:554249)
    at https://DISCOURSE/theme-javascripts/d829ea593b9ddad05ea983e6419ea86ee453ee60.js?__ws=DISCOURSE:21:24
    at e.withPluginApi (https://DISCOURSE/assets/application-5b495fcb7ef238c0b1efb890288628c6c2a88722f76a13aa45a533b7c0dda246.js:1:418956)
    at Object.initialize (https://DISCOURSE/assets/application-5b495fcb7ef238c0b1efb890288628c6c2a88722f76a13aa45a533b7c0dda246.js:1:205795)
    at https://DISCOURSE/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:1:334072
    at i.each (https://DISCOURSE/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:1:494808)
    at i.walk (https://DISCOURSE/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:1:493827)
    at t.each (https://DISCOURSE/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:1:493274)
    at t.topsort (https://DISCOURSE/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:1:493320)
hostname	discourse-app
process_id	17610
application_version	6275c05c0de4da501bf9e5ba40a82280c79ec6a8
REQUEST_URI	/logs/report_js_error
HTTP_USER_AGENT	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36
message	DiscoTOC theme/component is throwing errors
stacktrace	Error: Could not find module ember-addons/ember-computed-decorators at https://DISCOURSE/

I think this is fixed in the latest commit 2hrs ago?