Skip to content

Instantly share code, notes, and snippets.

@noteed
Last active July 18, 2020 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noteed/54456694d7d778bbc2f7a2e7946755e9 to your computer and use it in GitHub Desktop.
Save noteed/54456694d7d778bbc2f7a2e7946755e9 to your computer and use it in GitHub Desktop.
Markdown tricks

Markdown tricks

Note that GitHub and Pandoc have different behaviors.

Checkboxes

  • Unchecked
  • Checked

In this Gist, clicking checkboxes create new commits, e.g. this one.

<details> for collapsable content

The HTML5 details element is rendered as collapsable content on GitHub.

The following content

<details>
  <summary>Summary, always visible</summary>
  ...
  Some content, initially hidden.
  ...
</details>

is rendered as follow:

Summary, always visible ... Some content, initially hidden. ...

It can be made open by default, with the open attribute:

Summary, always visible ... Some content, initially visible. ...

It is also possible to nest such collapsed content using the blockquote element to group children:

etc
nixos
configuration.nix
hardware-configuration.nix

Note: it seems better to leave a blank line after or before the blockquote tags.

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