Getting Started with Discourse

How-To: Table of Contents

(So lets try Something found here).

If you want to create a table of contents for the discussion thread it can be done as so:

Source (expand me)
- [link to first heading](#heading--first-header)
- [link to second heading](#heading--second-header)
- [link to third heading](#heading--third-header)
- [link to fourth heading](#heading--fourth-header)


<h3 id="heading--first-header">First One</h3>
some text

<h3 id="heading--second-header">Second One</h3>
more text

<h3 id="heading--third-header">Third One</h3>
even more text

<h3 id="heading--fourth-header">Fourth One</h3>
ok no more text

Result:


First One

some text

Second One

more text

Third One

even more text

Fourth One

ok no more text

Note that the ID’s don’t only work within one single post but throughout the page, for an example the ToC in the opening post is pointing to the header in the beginning of this very post!

edit, changed it because: Just noticed it works however only if you already have the relevant discussions(replies) loaded/cached, a downside to the dynamic nature of discourse. Since this post falls within posts 11 to 20 its effectively on page 2.

^ Back to Top ^

1 Like