NanoFile

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.

Inline link
[NanoFile](https://nanofile.app)
With a title on hover
[NanoFile](https://nanofile.app "Open .md files in your browser")
Reference style, for a document with many links
See [the viewer][viewer] and [the cheat sheet][cheat].

[viewer]: https://nanofile.app/en
[cheat]: https://nanofile.app/en/cheatsheet

The definitions can sit anywhere in the file, usually at the bottom, and they do not render.

Automatic link, and linking to a heading
<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.

Related