Markdown links
A link is the text in square brackets followed immediately by the URL in round brackets. No space between the two, which is the mistake that catches everyone once.
[NanoFile](https://nanofile.app)[NanoFile](https://nanofile.app "Open .md files in your browser")See [the viewer][viewer] and [the cheat sheet][cheat].
[viewer]: https://nanofile.app
[cheat]: https://nanofile.app/cheatsheetSee the viewer and the cheat sheet.
The definitions can sit anywhere in the file, usually at the bottom, and they do not render.
<https://nanofile.app>
[Back to the pitfalls](#pitfalls)What usually goes wrong
- No space between
]and(. With a space it renders as literal brackets followed by text in parentheses. - A URL with spaces or brackets in it needs angle brackets around it:
[text](<https://example.com/a file>), or percent-encode the spaces. - An anchor link points at a heading's generated id: lowercase, punctuation dropped, spaces to dashes.
## My Section!becomes#my-section. - A bare URL is not always a link. GitHub turns it into one, strict markdown does not.
<https://example.com>works everywhere.