aidenlx / alx-folder-note

Add description, summary, and more info to folders with folder notes.
MIT License
244 stars 13 forks source link

[feature request] Allow templater templates for folder note creation #117

Closed vorpalvorpal closed 7 months ago

vorpalvorpal commented 1 year ago

Would it be possible to call a templater template on creation of a folder note?

FynnFreyer commented 7 months ago

You can already do that. It's just not folder note specific, but for every file created in your vault.

Set "Trigger Templater on new file creation"

Set "Trigger Templater on new file creation" in the Templater settings and add your templater code to the "Folder Note Template" in the Folder Note settings.

I'm using this for example: <% tp.file.include("[[Default Frontmatter]]") %> This allows me to use a dedicated file where I can edit and put it under version control more easily.

As noted in the settings: this runs code whenever a file is created in your vault, which is a serious risk on untrusted inputs. But I assume you're a grown adult and know the risks ;)

vorpalvorpal commented 7 months ago

Awesome. I didn't realise it would be so simple.