Skip to content

Instantly share code, notes, and snippets.

@mrgnw
Last active July 20, 2020 13:20
Show Gist options
  • Save mrgnw/92c6f802df9e28ab2856d66e5aba5c58 to your computer and use it in GitHub Desktop.
Save mrgnw/92c6f802df9e28ab2856d66e5aba5c58 to your computer and use it in GitHub Desktop.
expandable details.md

<details> is underused IMO, especially in docs & readme's.

Could there be an easy, sensible markdown syntax that would increase usage?

How it is --> how it could be?

diff

Idea 1: Headers

Headers could be a natural way to set boundaries.

###> Mac

 brew install whatever

###> Windows

choco install whatever
  1. <details> starts at h3 ###>
  2. <summary> is the h3 text
  3. </details> ends the collapsible section before the next h3, h2, or h1

Idea 2: 🤷🏻‍♂️

What do you think?

How to use <details> in markdown now.

Installation

Mac
brew install whatever
Windows
choco install whatever

if you're lucky

The html+markdown

## Installation

<details>
  <summary>Mac </summary>
  
  ```sh
  brew install whatever
  ```
 </details>
 <details>
  <summary>Windows </summary>
  
  ```sh
  choco install whatever
  ```

  if you're lucky

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