-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
The Existence of a Table of Contents #27
Comments
+1 to TOCs they're super useful in big readmes (and should be an error not I do agree TOCs for small readmes are not needed. But for example, id prefer a TOC in orbit's readme cause it's pretty big
|
A TOC is useful once there are a significant amount of sections. I.e. a small readme doesn't need it. The Standard readme could require a "fold" meaning: There is a section with two up to 4 paragraphs required before the TOC. And the TOC excludes the information before the fold. The TOC should imho. also only be required when there are more than 3 |
As it currently is, the long description goes before the ToC, and can get rather long - it's not inaccurate to put a subsection in the long description (h3 or h4) and then a few more paragraphs. I think this is fine. I don't want to put a character limit on it, although that may be the right way to go. I don't want to limit the number of h2s, either, because there's nothing saying you can't have three hundred h3s in one h2. Perhaps an lower character bound of 1000, above which you need to have a ToC. Lines might be a better metric than characters. |
Actually
I think that is worth being an issue itself. This kind of doc would be really badly structured and the structure can be improved to make sense to read 😉 |
Fair point. Consign long API headers to |
The ToC is now optional if your README is under 100 lines. I think this solves the issue elegantly. |
What
Some people have asked me why the Table of Contents is important. Example.
Background
I've been getting some pushback about table of contents being mandatory. For small READMEs with minimal sections, I can understand why this is a friction point. The Table of Content takes up visual space.
However, for longer READMEs, I think a Table of Contents is super important. It allows the reader to know what sections are included in the README at a glance, normally without scrolling down, unless the reading window is small (and, if it is small, a Table of Contents can help signpost whether it is worth scanning to the end or not).
I suspect that most of the time a new module is discovered, it is discovered on GitHub these days - the Table of Contents provides an easy way to navigate a README.
The text was updated successfully, but these errors were encountered: