m2n037 / awesome-mecheng

Awesome Mechanical Engineering Resources
GNU General Public License v3.0
1.1k stars 206 forks source link

Compress the TOC into one collapsed line #29

Closed pwab closed 6 years ago

pwab commented 6 years ago

Summary

I want to suggest to compress the table of contents into a one-liner. I saw this on some github projects and I think this gives a big readme file some advantages:

This is the current state

This is the suggestion

Table of Contents * [Point 1](#point1) * [Point 1.1](#point11) * [Point 1.2](#point12) * [Point 2](#point2) * [Point 2.1](#point21) * [Point 2.2](#point22)

This is the code

<details>
 <summary>Table of Contents</summary>

 * [Point 1](#point1)
    * [Point 1.1](#point11)
    * [Point 1.2](#point12)
 * [Point 2](#point2)
    * [Point 2.1](#point21)
    * [Point 2.2](#point22)
</details>
Clockmaker commented 6 years ago

That's a neat idea, I tried this on my test-branch

Table of Contents
-----------------
<details open><summary>Hide/Show</summary><br/>
...
</details>

I used the option open because to me it's more intuitive and skim-friendly; also you don't lose the contents' anchor.

On a side note, I didn't use sub-lists on purpose (preeetty ugly 😄).