-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include {{file}} in variables #242
Comments
Since |
Thank you, that is super useful |
One issue is that the path string is not URL encoded, I would like to automatically preview the pdf inside the note if it exits, however, for example, when using
Instead of something like this: Also it would be great to not use an absolute path, since opening this note would break in a different machine. I am not sure how this could be implemented, maybe to allow an environment variable BTW, great work on the plugin! |
I ended up writing my own javascript module to get the file link URL encoded. When the template runs, it runs this custom templater script. I don't have the same absolute path problem (for now) since my machines have the same user (blame Microsoft account), so I don't think my script would work for you. But the idea is to search the folder where the PDFs are located, find the one with the same name as the template you're generating, find and replace spaces for In the citations template it looks lile: |
That looks very promising, I guess in that custom script a more extensive encoding could be applied to make it more robust (not just spaces) |
I need a link to the location of the PDF in my local file structure.
I would like the variable {{file}} to be included in the template.
This variable exists in my .bib file, I would like to be able to include it in my obsidian template.
The text was updated successfully, but these errors were encountered: