mProjectsCode / obsidian-media-db-plugin

A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.
GNU General Public License v3.0
255 stars 31 forks source link

Toggle on/off default front matter for Custom Templates #91

Closed thisisgonnatakeawhile closed 10 months ago

thisisgonnatakeawhile commented 1 year ago

Hi peeps,

I was wondering if it'd be possible to have a quick toggle for the Custom Template feature which could enable or disable the default front matter on new custom templated notes.

It'd be great if our own Custom Templates could also include our own custom front matter without needing to set all Property Mappings to 'remove'.

Thanks!

P.S: If this behaviour is already a feature and I have overlooked it, please excuse my ignorance.

kelszo commented 1 year ago

+1 for this. Should be handled how the original Obsidian Book Search Plugin does it.

I.e. the user specifies a path for a template and the plugin uses that template without inserting it's own frontmatter.

Is this plugin still being developed? I would have no problem creating a pull request fixing this if I can get a thumbs up from someone with merging capabilities.

mProjectsCode commented 1 year ago

sure, I am just a bit busy atm and because of that only fixed major bugs.

if you create a PR for this then please make the feature an optional toggle and keep the current default behavior.

kelszo commented 1 year ago

Ok thank you @mProjectsCode

One quick question though, in FileSuggest.ts the suggestion text and following value uses file.name (contra file.path like in FolderSuggest.ts)

Is this on purpose? file.path is better when selecting files due to duplicates in names can exist.

mProjectsCode commented 1 year ago

you can change that to show the file path if you want. I don't think there was a reason why one shows the file name.