Skip to content

Instantly share code, notes, and snippets.

@stuartd
Created June 12, 2025 02:07
Show Gist options
  • Save stuartd/94c5b63bb9bd3e55965b0500b9fe988b to your computer and use it in GitHub Desktop.
Save stuartd/94c5b63bb9bd3e55965b0500b9fe988b to your computer and use it in GitHub Desktop.
GitHub Markdown Tricks

Summary and details

Click to see the details The details...
Click to hide the details The details...

Warnings and notes etc

Warning

This is a warning

Note

This is a note

Important

This is important

Tip

Only if the service was good

Caution

Be careful..

Aesthetic text (aka scientific notation)

$This\ is\ nice$ $e=mc^2$

Footnotes

This has a footnote 1 below

Console

$ grep foo bar
grep: bar: No such file or directory

Markdown

### Summary and details

<details closed="See the details">
    <summary>Click to see the details</summary>
    The details...
</details>

<details open="Hide the details">
    <summary>Click to hide the details</summary>
    The details...
</details>

### Warnings and notes etc

> [!Warning]
> This is a warning

> [!Note]
> This is a note

> [!Important]
> This is **important**

> [!TIP]
> Only if the service was good

> [!CAUTION]
> Be careful..

### Aesthetic text (aka scientific notation)

$This\ is\ nice\$
$e=mc^2$

### Footnotes

This has a footnote [^1] below

[^1]: The footnote

### Console Text

```console
$ grep foo bar
grep: bar: No such file or directory
[closing backticks omitted for formatting]

Footnotes

  1. The footnote

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