I need some help introducting page variables specified in a given post *.md file. I have to include a list of figures from a directory which changes by post (so as to organize the images better) and don’t want to type the full path in the image src attribute.
So I was thinking I could define a variable like imagedir = “/assets/images” at the top of the particular post. The image directory for this post will contains the images for that post.
My problem is that I don’t seem to be able to inject the variable correctly. For example I have used
and some other variants but it doesn’t render at all.
What is the correct way to introduce a variable defined in the post *.md file (at the top) subsequently in the document.