Markdown variable substitution

Some markdown systems support templating engines, where you can define a variable and have its value substituted in whenever you reference it; this could be helpful for taking concise notes.

My particular use case (I’m sure there are others): I take notes on youtube videos, and want to cite each point by linking back to the location in the video, e.g. Obsidian is cool [00:30](youtube.com/exampleurl?t=00m30s). This can get very unwieldy, with many long links that are almost identical except for the timestamp at the end.
What if I could define somewhere in the file that ${yturl} = youtube.com/exampleurl?t=, and then write Obsidian is cool [00:30](${yturl}00m30s), which the markdown interpreter would expand back into the full link? Much more concise and simple to write, while having an equally readable source and the same rendered output.

1 Like

Some existing implementations:

Some otions for defining value of variable: