Option to automatically store metadata of first share date #194
TangentFoxy
started this conversation in
Vote for upcoming features
Replies: 1 comment 1 reply
-
|
This can be easily done already. Make a Templater template (or CustomJS) action, with the following: <%*
// Add the "first shared" date to the frontmatter
await app.fileManager.processFrontMatter(tp.config.target_file, frontmatter => {
if (!frontmatter['first_shared_date']) frontmatter['first_shared_date'] = moment().format('YYYY-MM-DD')
})
// Share the note
app.commands.executeCommandById('share-note:share-note')
-%>Set that to be whatever hotkey you normally use for sharing a note, or alternatively execute it from Templaters "Open Insert template modal" menu. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking at my shared notes and realized I'd like to have when I first shared them in the frontmatter and not just when they were most recently updated. I know this is probably not something everyone wants cluttering their notes, hence why I ask for it as an option.
Beta Was this translation helpful? Give feedback.
All reactions