mo-seph / obsidian-note-from-template

Simple plugin to create Notes from a template, and fill in fields defined there
MIT License
108 stars 9 forks source link

Can't get the plugin to create a file at all #19

Open edward-peters opened 2 years ago

edward-peters commented 2 years ago

I've tried for some time to get this working, but whatever I do (have read all the docs etc) when I click the Add button on the 'Create from Template' modal no file is created, and there is no error message. Would you have any advice on what I should check to diagnose this problem? Thanks!

mo-seph commented 2 years ago

Sorry to hear this is being difficult! Can you look at the javascript console and let me know what happens?

Would you be able to share your template?

FelipeRearden commented 2 years ago

@edward-peters try the new version 1.10.0

I think it will work :)

edward-peters commented 2 years ago

@mo-seph @FelipeRearden Sincere apologies for slow reply, and thank you for generously trying to help me. I have tried again and I think my problem is not a bug but my own failure to understand exactly how to set up the config. Will work more on really understanding all the documentation. thanks again.

OsoRojo commented 2 years ago

@edward-peters Make sure that the file isn't being created, but not opened in the editor. There's an outstanding but (recently fixed) that can cause this and lead to confusion.

edward-peters commented 2 years ago

I must be missing something as I still cannot get this to create a note. I've studied the documentation but really can't figure out what I am doing wrong.

My template is:

---
template-filename: "{{title}}"
template-output: 80-89 TOPICS/82 Quotes/82.01 Quotes single
template-input: title, body
---
# {{title}}

{{body}}

When I run the command, the popup works fine, I input the title and the body, but nothing is created. The console says: Uncaught (in promise) TypeError: Invalid template! Template should be a "string" but "undefined" was given as the first argument for mustache#render(template, view, partials)

Any help would be much appreciated