Vojtěch Struhár

Posted on 20. 3. 2026 | #markdown

Better Markdown Links

So recently I was reading the docs of a embeddable scripting language Wren. The way they’re doing markdown links caught my attention.

We all know (and like??) markdown links like these:1

See my projects on [my GitHub](https://github.com/VojtaStruhar)! Those that I'm especially proud are on [my website](https://vojtechstruhar.com/projects).

Rendered, it will look good, of course. But if you are reading markdown in plaintext, the URL breaks the flow of the sentence a lot. These URLs are modestly short and even they are an eyesore.

Now see this - the result is exactly the same:

See my projects on [my Github][]! Those that I'm especially proud are on [my website][].

[my Github]: https://github.com/VojtaStruhar
[my website]: https://vojtechstruhar.com/projects

You can define the URL by referencing the text of the link! These references do not have to be on the next line, you can stuff them away at the bottom of the document. Now the markdown reads much better if someone happens to open it in a text editor!2

Both Obsidian and Typora seem to know this syntax and work well with it. Astro (which renders this very website) also processes it correctly. That’s awesome, I’m definitely going to be using this feature more! Why did nobody tell me? 😄

Typora (top) and Obsidian (bottom) handling this arcane markdown link syntax

I can’t actually find any documentation on this feature, but it seems wide-spread. If you know what is it called, leave a comment, please!

Bonus Round

The glaring hole in the approach above is that links that look the same also have to point to the same URL. This is apparently fixed by the following format:

On my personal [website][], my best projects have a [website][projects] of their own!

[website]: https://vojtechstruhar.com
[projects]: https://vojtechstruhar.com/projects

Perhaps this is the best of both worlds?!

Footnotes

  1. Referenced by Markdown Guide: https://www.markdownguide.org/basic-syntax/#links

  2. Wren index markdown page in raw form: GitHub (I used the old stinky syntax for this one)

Read next → Get tile rotation from TileMapLayer