Skip to content

Automate README table of contents with doctoc - #647

Merged
jbampton merged 2 commits into
NextCommunity:mainfrom
Prathamesh-Singh:docs/automate-readme-doctoc
Oct 4, 2026
Merged

jbampton merged 2 commits into
NextCommunity:mainfrom
Prathamesh-Singh:docs/automate-readme-doctoc

Conversation

@Prathamesh-Singh

Copy link
Copy Markdown
Member

Summary

  • replace the hard-coded README table of contents with a doctoc-generated TOC
  • include all README heading levels
  • add a prek hook to keep the TOC up to date

Fixes #640

Testing

  • uv run prek run doctoc --all-files
  • uv run prek run --all-files

All hooks passed successfully.

@deepsource-io

deepsource-io Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in b391a41...530696f on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Oct 4, 2026 3:12a.m. Review ↗
Secrets Oct 4, 2026 3:12a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@jbampton jbampton self-assigned this Oct 4, 2026
@jbampton jbampton added this to the Hacktoberfest 2026 milestone Oct 4, 2026

@jbampton jbampton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want a local hook or any package.json

This is not correct.

pre-commit or prek hooks are self contained mostly we don't need extra dependencies.

https://github.com/thlorenz/doctoc#usage-as-a-git-hook

@jbampton
jbampton marked this pull request as draft October 4, 2026 01:00
@jbampton jbampton added on hold pre_commit Pull requests that update pre_commit code yaml markdown labels Oct 4, 2026
@Prathamesh-Singh
Prathamesh-Singh force-pushed the docs/automate-readme-doctoc branch from 15b5739 to bd7d51e Compare October 4, 2026 02:37
Comment thread .pre-commit-config.yaml
@Prathamesh-Singh

Copy link
Copy Markdown
Member Author

Hi @jbampton,

Thanks for the feedback. I updated the pull request as requested:

Removed the doctoc dependency from package.json.
Restored package-lock.json.
Removed the local doctoc hook.
Added doctoc as a remote prek hook using the documented repository configuration.
Kept the existing local hooks unchanged.
Updated the README table of contents.
Updated the branch with the latest changes from upstream/main.
Ran the doctoc hook and the complete prek checks successfully.
The changes have been pushed to the existing pull request for review.

@jbampton
jbampton marked this pull request as ready for review October 4, 2026 03:28

@jbampton jbampton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🏂

@jbampton
jbampton merged commit f0c6704 into NextCommunity:main Oct 4, 2026
16 checks passed
@jbampton jbampton added the paid label Oct 4, 2026
@Prathamesh-Singh

Copy link
Copy Markdown
Member Author

Thanks for the review and for merging, @jbampton! Happy to help with anything else on the repo.

@jbampton

jbampton commented Oct 4, 2026

Copy link
Copy Markdown
Member

You should join the team on Discord

https://discord.gg/hKUH56YHXp

Thanks once again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add prek based doctoc for the README

2 participants