all
I am looking for a simple way to add today's date in my marp markdown. Something like
{{ date }}
Any idea?
Thanks
all
I am looking for a simple way to add today's date in my marp markdown. Something like
{{ date }}
Any idea?
Thanks
Copyright © 2021 Jogjafile Inc.
Here is one way using the
Date()
function in JS. This could then be customised to display exactly what you wanted (date, time, specific date format etc.)With this method though, if viewing as a HTML slide deck then the datetime will change each time the page is loaded.
If you wanted to insert a static time (e.g. file save date etc), perhaps the easiest way would be to just do a regex replace on a certain phrase eg. {{ date }} as above, before you get Marp to convert the document.