Link with ref, relref: Why not use markdown syntax?

A newbie question: What is the advantage of shortcodes ref and relref versus a simple markdown link? (I need just simple links, no referring to another language or output format.)

I am using the R package blogdown with a combination of .md, .Rmarkdown and .Rmd files. The syntax of markdown links is easier to write, remember and is the same in all three file formats, whereas with shortcodes there is different behavior in .Rmd files but also – in my understanding so far – if you link into the same section (with relref) or in another section (with ref).

If you use ref or relref then links will be updated if you change the directory structure. But you don’t need to use the shortcodes, regular markdown links work just fine.

2 Likes

What @funkydan2 said. Also:

  • if using ref, if your baseURL ever changes, it’ll be picked up automatically
  • when using either shortcode, you don’t have to specify the full file path. As long as the filename is unique, specifying the filename, without extension, is good enough
1 Like

Thanks, both answers helped. I thought already that one of the advantages may be that changes are updated automatically. But in the very unlikely case of an URL change, I could put Aliases in the front matter.