Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

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

Open
anoadragon453 opened this issue May 16, 2022 · 0 comments
Labels
A-Docs things relating to the documentation T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@anoadragon453
Copy link
Member

This would allow the table of contents to be less massive on the config documentation page after #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 <!-- exclude-from-toc -->

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 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Docs things relating to the documentation T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

1 participant