Variables

Options shown with examples.

URL

https://github.com/<USERNAME>
https://github.com/{USERNAME}
https://github.com/[USERNAME]

Curly brackets are used in Shell so don’t work everywhere.

Hard brackets are used for optional values in CLIs so could be misleading.

Shell

Avoid using $VAR , then someone knows to use their own value.

command PATH
command <PATH_TO_DIR>/foo

You can also use lowercase - from a git command’s help:

git pull <remote> <branch>

At the top of a file, you can give a summary horizontally of important links.

Use an emdash rather than a pipe, for increased spacing. I’ve seen this in use before.

Code:

[foo](target) &mdash; [bar](target)

Result:

foo — bar

About the emdash

The mdash or emdash is the width of the letter M while the endash is the width of the letter N.

HTML

&mdash;

Read more here - HTML emdash.

Text

Instead of the HTML symbol you can use the plain text one: —.

Note that this can look different depending on the view - GH markdown editor view it looks too narrow but on a markdown rendered page it looks wide. And it is not used with spaces on each side.

Here are keyboard shortcuts:

  • Windows: CTRL+ALT+-
  • macOS: SHIFT+OPTION+-

From emdash article on Grammarly site.