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

Table of Contents #1

Open
jehna opened this issue Apr 30, 2016 · 1 comment
Open

Table of Contents #1

jehna opened this issue Apr 30, 2016 · 1 comment

Comments

@jehna
Copy link
Owner

jehna commented Apr 30, 2016

From proposal of @lehtu:

[ToC] would be nice to have, especially when you have a long README

@jehna
Copy link
Owner Author

jehna commented Apr 30, 2016

There has been conversation about bringing automatic ToCs to Github Flavoured Markdown:

isaacs/github#215

The thread also has some nice tools that users have made to automatically generate ToCs.

I see a couple of issues regarding to hand-crafted ToCs:

  • If ToC is something you'd need to update yourself, you probably won't do it
  • The ToC should be the first thing of the README for the reader, but it should be the last one for the creator
  • Creating ToC is not a creative, but rather mundane task that should be performed by an automated machine

A good ToC should be generated automatically by postprocessor of some kind:

  • Github itself
  • Your text editor (like in MSWord/Pages)
  • Some CI tool
  • A client-side JS when viewing the github page
  • A client-side browser plugin

Moreover, you should keep your README.md file as compact as possible. If you feel like you'd need a ToC because of the length of your README, the best practice would be to break it to multiple smaller files, so the actual README would serve as a brief summary of the project with links to in-depth files like:

  • CONTRIBUTING.md
  • INSTALLING.md
  • etc.

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

No branches or pull requests

1 participant