Embedding the file's updated date?
Is there something I could put into the markdown of an entry to get the Updated date for that entry?
I know I could maintain a date in the metadata, but I was wonder if there is some tag or whatever I could use to have that date automatically set with the last save date of the markdown file.
Based on my understanding, you can create a draft of your post in a file named [draft]my_post.md and begin writing your post. Let's say you create the draft on 01/01/2023. If you take it out of draft and publish it on 01/03/2023, the date stamp for the post will still show the original creation date of the draft, 01/01/2023. This is how I understand it currently functions.
As I understood, you would like the date of your post to reflect the day you publish (bring the post out of draft) and for the date of your new post to reflect the day it was published not the day the draft was created. Is this correct?
Answered 2 years ago · Edit answerIt depends on the editor you're using -- some editors like Obsidian (via the templater plugin) can automatically update a {{date}} variable in your post to when you last saved it.
Or you can assign a hotkey to insert the current date although that's not as automatic.
Another way is to hack Blot's templates to show the {{updated}} instead of {{date}} which is what I also did to reflect both the original date and updated date below (i.e. it says "Updated 5 days ago").
Ray
Answered 2 years ago · Edit answerI'd prefer NOT to maintain the last date the file was updated in the metadata.
The physical file has the last modified date, and I was wondering if I could display that automatically by adding something to that one markdown file.
I have one post that I update every so often.
Answered 2 years ago · Edit answerYou can't add this to your Markdown file/post, but you can trigger this in your template. For example, in your post, add the following custom metadata:
with_updated: yes
And then in your template's entry.html file, add something like this inside the {{#entry}}
block:
{{#metadata.with_updated}}
{{#formatUpdated}}D, M, YYYY{{/formatUpdated}}
{{/metadata.with_updated}}
You can use any of Blot's date tokens
Answered 2 years ago · Edit answerIs there a way to do this in a Page instead of a Post? ie in a Page have the date the file was last updated included on that page. Thanks as ever.
Answered 8 months ago · Edit answer