Skip to content

Automatically generate table of contents in text #2213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ed-kung
Copy link
Contributor

@ed-kung ed-kung commented Jun 7, 2025

Description

Closes #2208

Writing {:toc} on its own line will automatically render a table of contents as a bulleted list, using the headings (#, ##, etc) contained in the post.

Screenshots

auto-toc.mov

Additional Context

n/a

Checklist

Are your changes backwards compatible? Please answer below:

yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

  1. If another post had {:toc} somewhere it could render in unexpected ways.

The behavior of links that start with a hash (i.e. #section-1) has also changed, but I can't see why anyone would've wanted such links to open in a new tab.

For frontend changes: Tested on mobile, light and dark mode? Please answer below:

n/a

Did you introduce any new environment variables? If so, call them out explicitly here:

no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automated generation of table of contents
1 participant