I guess there’s two schools of thought when it comes to creating content in Obsidian and other note taking platforms like it. The first is to create a document with all of the formatting but also a lot of blank spaces, which is copied and modified when a new document needs to be added. The second is to completely over-engineer a solution that probably won’t hold up under excessive use, which is to create a form that can be filled out and which will automatically generate a new document based on an existing template.
Guess which one I have chosen?
The Template

I created a template, which is just a note in a nested folder. I’m basing all of this on Josh Plunkett’s series of videos and posts on his D&D Obsidian setup which I talked about in my previous post. I’m trying hard not to copy his setup, so I have created this basic template from which to start.
The Form

Using a plugin called “Meta Bind”, I am able to create form elements which can store their data in the document’s “front matter”. Front matter is a specially coded section at the top of a Markdown document that holds metadata in a key:value format. We can put whatever we want in front matter, and using other plugins we can also query it, which is something I hope to get to eventually.
The Magic Button

At the bottom of the form I have a button labeled “Create”. After the form has been filled, I’ll click this to create the new document built from the form data.

This is the code behind the button. It is using the “JS Engine” plugin to allow JavaScript to be added to a document which, in this case gets a reference to the form document (from which it’s called), creates a button, and when clicked, that button calls a script that is parsed by another plugin called Templater.
Templater Script

This script once again gets a reference to the active document — our form — and then loads a template specified by a special front matter variable located in the form called “template”. This tells the script which template file to merge into. Then, the script will cycle through all of the front matter keys in the form. I had to do some parsing in order to format images, but ultimately the keys of the front matter are used to replace similar keys in the merge template. Finally, once the script has completed it’s actions, I move one single front matter element — “tags” — into the newly created document.
The Result

Now I have a new document that is built upon a specific template, but which was created using form elements that allowed me to control the types of data that were made available to the user (i.e. me). I won’t have to hunt for relevant document links as drop-downs are keyed to only pull documents from specific locations based on what I want (factions, other locations, etc). I can also browse images without having to know their file name ahead of time.
Is this overkill? Possibly, yes. Was it more work than just creating a template I can use to copy and modify? Most assuredly so. But I know a little more about Obsidian now than I did this morning, so it’s not been a waste of time, I can say that much.