Skip to content

chore: add table of contents to README#532

Merged
KLongmuirHD merged 3 commits intomainfrom
chore/add_toc_to_readme
Apr 14, 2026
Merged

chore: add table of contents to README#532
KLongmuirHD merged 3 commits intomainfrom
chore/add_toc_to_readme

Conversation

@KLongmuirHD
Copy link
Copy Markdown
Contributor

@KLongmuirHD KLongmuirHD commented Apr 14, 2026

  • Add table of contents to README
  • Add a pre-readme.js to fix some annoying things about OCLIF's autogenerated notes
  • Move some README patching from package.json to the new script, to have everything in one place
  • update package.json commands to ensure the README is updated properly on new releases, without us having to remember the chore

OCLIF Things:
the toc generation out of the box with oclif doesn't work. it only looks for h1 tags, which is why it just generates the top level title of the README, the app name. I added a new dev dependency to generate the table of contents, instead of oclifs.

Another thing to workaround, is that oclif generates the commands section with every command as an H2 tag. this makes the table of contents huge, spelling out every command. Overwriting the H2s to H3s inside the auto generated commands section, post generation, makes the table of contents much smaller and more usable

@KLongmuirHD KLongmuirHD requested a review from a team as a code owner April 14, 2026 00:41
@KLongmuirHD KLongmuirHD merged commit ea9ad79 into main Apr 14, 2026
12 checks passed
@KLongmuirHD KLongmuirHD deleted the chore/add_toc_to_readme branch April 14, 2026 15:12
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.

3 participants