DiscoTOC - automatic table of contents

Hello,

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!

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:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - 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.

Eg:

<blockquote>

### Anchor Header

</blockquote>

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

3 Likes

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.

2 Likes