Is it possible to create a dynamic template substitution? (e.g. based on file name) #844
Unanswered
PuppyGirlBelly
asked this question in
Q&A
Replies: 0 comments
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'm trying to create a daily note template that includes links to navigate between previous and following daily notes (e.g. "yesterday" and "tomorrow"). Which I prefer to avoid needing to rely on editor commands if I ever choose to migrate my notes again. I got a solution that works decently enough for the current day's daily note;
Which results in the following links for today (March 20th);
However, if I make a new note for a date different from todays (e.g.
:ObsidianToday +3); it will only populate with the the current's day's "yesterday" and "tomorrow".I can see why this happens, the command to create a daily note does not open it in a buffer as it's being created. Which results in the
vim.fn.expand "%:t:r"to query the currently opened buffer.I'm wondering if there's a way to query variables about the newly created file as it's template is being processed (e.g. the file's title)? Since that would help me achieve my goal.
Beta Was this translation helpful? Give feedback.
All reactions