Skip to content
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

Feat (#2284): Feature: Add Table of Contents to the Readme #2285

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

KameronKeller
Copy link

Description

Original vs. Suggested Update:
readme_updates

Suggested Heading Change:
image

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

@andreassiegel
Copy link
Contributor

I'd suggest converting the README to AsciiDoc to be able to make use of a table of contents macro.

I'm afraid the manually created TOC might not be maintained too well, resulting either in a broken or inconsistent state at some point in time.

@KameronKeller
Copy link
Author

Thank you Andreas, I will look into what it would take to create a macro for the table of contents.

@andreassiegel
Copy link
Contributor

andreassiegel commented May 15, 2024

Thank you Andreas, I will look into what it would take to create a macro for the table of contents.

@KameronKeller Unfortunately, I currently don’t have the time to prepare a specific example for the Bruno repository but I can point you to an example in one of my repositories.

With a README in AsciiDoc format, all it takes to get a table of contents are these two lines in the file header:

:toc: preamble
:toclevels: 3

https://github.com/andreassiegel/tessa/blob/2ae3c8c046189e4ae7f67705c31f4a1e03c80c77/README.adoc?plain=1#L7-L8

Actually, the first one would be sufficient to automatically get the table of contents.
The second one then defines how deep the TOC should be.

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.

None yet

2 participants