bruno icon indicating copy to clipboard operation
bruno copied to clipboard

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

Open KameronKeller opened this issue 9 months ago • 3 comments

Description

  • Adds a table of contents to readme.md
  • Changes header styles for the different sections to introduce better distinction between the sections
  • Adds a hierarchy to some of the sections for better readability
  • See issue #2284
  • View the readme.md in my fork here to sample this change: https://github.com/KameronKeller/bruno/blob/feature/table-of-contents/readme.md

Original vs. Suggested Update: readme_updates

Suggested Heading Change: image

Contribution Checklist:

  • [x] The pull request only addresses one issue or adds one feature.
  • [x] The pull request does not introduce any breaking changes
  • [x] I have added screenshots or gifs to help explain the change if applicable.
  • [x] I have read the contribution guidelines.
  • [x] 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.

KameronKeller avatar May 10 '24 15:05 KameronKeller

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.

andreassiegel avatar May 12 '24 10:05 andreassiegel

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

KameronKeller avatar May 14 '24 20:05 KameronKeller

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.

andreassiegel avatar May 15 '24 18:05 andreassiegel

Merged ! Thanks @KameronKeller !

helloanoop avatar Aug 27 '24 11:08 helloanoop