How To Create Root Relative Links?

If I create a reference link thus:
[1]: /root/folder/document

When compiled it produces

This means I have to edit the html document with search and replace on all the links.

Is there a way to preserve the link as written instead of having it be converted into a file reference?

Or must we always use full URL’s when creating links?

Note that the full URL works as expected.


Yes, you can use relative linking, but of course in your example you typed in an absolute link so it will be treated that way. I’m not sure what you mean by relative from root, since that is by definition an absolute link. Maybe I’m missing something. Here are examples that work:

Link to parent folder


Thanks for your response.

Apologies for being “foggy”

These definitions are probably incorrect but the distinction I’m looking for is

Absolute URL

Root Relative will be: /root/folder/document.html

Where root is a folder that is a subdomain.

Okay, no worries we’re both actually correct I think—just in different contexts. I was using the terms in a universal sense, but you are correct in web usage, absolute means the “http://” part as well.

That all aside—I’m still getting verbatim URLs; i.e. what I type in is what gets used in the final output.

[code]Click here


<p><a href="/img/graphic.png">Click here</a></p>

Are you using MMD3 by chance? I’m testing in MMD2 (still have yet to transition as I have umpteen thousand files with deep MMD2 dependencies).


First: Thanks again

Second: Apologies, I just realized that I was getting ahead of myself and opening the compiled file in the browser to check the contents. I assume the browser is converting the links to local addresses so there is no problem!

Okay, yeah that might very well be the case. Checking in Firefox, that is what I see in the URL status bar when I hover over the link. file:///img/graphic.png