element-hq / element-hq/synapse

Unable to exclude a header from the table of contents on Synapse's documentation website

Open
#12,752 0 comments 0 reactions 0 assignees View on GitHub
A-Docs T-Enhancement
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#12752](https://github.com/matrix-org/synapse/issues/12752).

---

This would allow the table of contents to be less massive on the config documentation page after https://github.com/matrix-org/synapse/issues/12751 is completed.

Perhaps this could be done by adding some markup to the document to hint that the nearby title should be excluded from the table of contents. For example:

```
### My title
```

This has the advantage of not being visible when rendered, and is the sanctioned way to do comments in Markdown. It is [possible, though a bit fiddly](https://stackoverflow.com/questions/13363946/how-do-i-get-an-html-comment-with-javascript) to search for HTML comments in JS though...

The table of contents is built client-side by parsing the HTML of the page in https://github.com/matrix-org/synapse/blob/develop/docs/website_files/table-of-contents.js

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.