Your sites Log in Sign up Menu

Metadata in markdown links?

Just wondering if there is any way to use metadata tags in markdown links? At the moment this markdown:

![caption]({{url}}_images/picture.jpg)`

Becomes, this HTML:

<img src="/%7B%7Burl%7D%7D_images/picture.jpg" alt="caption">

The brackets just get encoded. Can this be avoided? Or should I just use HTML to start with?


a year ago, 1 replies   posts   markdown   metadata   Improve this question

There is no way to use the variables in your post!

But if you're trying to embed an image within your blog folder, please note you don't need to fully-qualify the URL. For example, this markdown will render correctly given your current directory structure:

![Caption](/_images/picture.jpg)

And this will work too, if _picture.jpg is inside the same directory as the markdown file:

![Caption](_picture.jpg)

Does that help?

Answered a year ago · Improve this answer