Status

This is the script for my meta-template picker video Obsidian: Building the Meta-Templater from Scratch - YouTube.

Currently working on this blog post

Post

Today I want to share, how to use a meta-templater in your workflow

so first, What is the meta-templater

(what it does - trigger template based on name of the file) Bryan Jenks

  • Bryan Jenks first coined this term, he adds this symbol in front of his links so it tells obsidian what kind of note this is supposed to be, so example a book source note.
  • so essentially, you are automatically triggering a template based on the name of the file

Tag Taxonomy - Petrichor - Obsidian Publish

(for example here is a meeting note creation - you can see it tags the metadata, adds in the structure)

Benefits are…

it’s great coz then you can just have templates easily load in (I do this a lot for my video templates) it also makes it easy to do meta data - since I prefer a tag based organization structure instead of folder based organization (I have a canva picture for this) even before you create a note, you know what a note is - see bryan jenks and his workflow with the uncreated notes

I don’t really like to use symbols (it’s kinda hard to remember) so I changed it to - a trigger phrase in front of a dash, and so (example - vid = youtube video template, plan opens a prompt)

another thing you can do with this is do like

what else you can do,

  • so use parentPhrases to trigger a prompt that allows you to trigger one of the sub templates,
  • rename it so that trigger phrase is gone / or so it follows your naming convention for these files (to make it easy to find)
  • move the note into a certain folder if it is a system note then go to easy to find place

Stuff

Do an outline

  • First, how to build a basic meta-templater
  • Then how to add to the basic meta-templater
  • extra stuff you can do with prompts
  • taking advantage of all the properly tagged notes
    • dataview
    • weekly review note embeds
    • supercharged links

Value

How to build a basic meta-templater

  • templater settings + new file settings
  • what the trigger can look like (so go javascript) - either first character (bryan) or phrase before dash (mine)
  • what is the logic of the code (see a workflow diagram) -
    • (is there a trigger) if there is a trigger, extract it and step 2. (else if no trigger then default note template)
      • (what is the trigger - is it a valid trigger?) if trigger is in list, use that template. Else default note template.
    • possible issues - daily note or weekly note has date trigger, so add those as edge cases
  • what kind of notes, so say you want to make source notes (ok here is the source note template) then here is the default note template
  • inside the meeting note template, you can
    • rename (I have a javascript to do all the things using templater script) - you can add timestamps or naming conventions (more on this later)
    • add aliases (naming convention does not mean that you don’t want the title to also be an option?)
    • meta data! - tag based organization
      • you can also move files - but like after experimenting with this for 3 months, I think a tag based organization is good enough (tags + dataview) and I just use folders for quick access or coz the plugin needs a folder
    • structure of the note
      • agenda - prepare for meeting
      • tasks etc
  • This is a working meta-templater and you can copy and paste the template bit, change this part for the phrase and this part for the template, and just make a working meta-templater.
  • you can also do a prompt template - for different source notes, and then have a template for each
  • How to use what you have made
    • why do all this automated tagging - coz then we can rollup meeting tasks and pick only tasks from most recent meeting (weekly review note) vs all incomplete tasks etc
  • I rec you keep a note with all the tags you use so you can easily keep track and also to generate supercharged links
  • How to do supercharged links batch from naming convention share my python script for (put in front or put behind) - page type vs status.

V1

Hook

💡 The first 15 seconds should immediately reinforce the value proposition that was promised in the title + thumbnail. We need a snappy hook that tells people “this video will deliver on what I was promised”.

When your templates auto trigger based on the trigger phrase in your link. So that you don’t have to remember and fill metadata (to reduce friction, effort and the chance you forget to tag the correct metadata. And like for people with a folder system, this means you don’t have to manually drag the file to the correct nested folder). This means you have the default status, metadata, headings, default tasks and rollup fields that you want for that specific page type. and then you can have dashboards that automatically index and organize your system for a bottom up system!

You can know what kind of page the link is even before you click it with your naming convention, have phrases that trigger prompts and templates that automatically rename and date your files. This also makes it easy to find links by searching for the page type then specifics.

Intro

Hi y’all, welcome back to the channel. If you’re new here, my name’s Pamela. I’m a graduate student in Singapore, and on this channel, we share ways to implement productivity systems that help us live relaxed potato life.

Today, I’ll be going over my version of the meta-templater.

Value

Credits to Bryan Jenk’s Meta-Templater which inspired mine. He uses symbols to trigger his templates using the same meta-templater concept. Link to his video in the description below.

I don’t like having symbols in my title and with symbols you are limited to a certain amount of characters you can use (based on what OS system you have). Like these are what you can use for mac. So I expanded upon his meta-templater to capture the phrase in front of a dash character instead. I also want to use a short phrase to trigger the template and maybe more than one phrase should trigger the same template, but I don’t like having weird abbreviations in front of my note titles. You might be like wait what, you can’t just rename manually? Well it’s just kinda introduces friction into my workflow and so I rename the template and move it at the same time, and this causes a little bug but I will tell you how to fix it later.

First, let’s talk about how this meta-templater works. First you want to ensure that your default notes folder is the same one that you are going to use for the meta-templater folder template trigger. It doesn’t matter which folder because you can get templater to move and rename your files later. So I just pick this, and do the same here in templater.

Now we need the meta-templater picker template, it has to be in your templates folder that you define in the templater plugin.

The first part of the code basically defines what to do if there is no trigger phrase. Which is use the default note template. This is really convenient because there will always be some new application that you don’t have a template for.

So this is the important line of my meta-templater finds the trigger phrase by splitting it anywhere there is a dash, and then taking the first portion which I call the trigger phrase. The templater plugin is basically going line by line through this and will take the first template that fits, so it is super important to ensure that your longer phrases are on top, and just generally design, your naming convention so there are as little overlap as possible. If you are interested, comment below and I’ll make a video on naming conventions. I have a basic one on my tagging conventions already up :)

But here is a little peek into my upgraded naming-tagging conventions that I am still ironing out the kinks for. Basically I have switched to using tags for metadata like page type, page status, which mode (area) of my life. This helps add clarity and I can use emojis! Because you shouldn’t use emoji’s in the file name if you want to sync with dropbox so I don’t use them in links but tags are fine.

Make templates for the page types that you use the most. Eventually it can be all the page types you use.

For example, I have templates for youtube videos, my zettelkasten system (inspired by my Ali Abdaal’s Notion Youtube Template and Beau Hann’s Zettelkasten system from Roam Book Club 4 - Day 29). Tip 1: You can control if the tasks show up in your task rollups with this indentation trick where you put the bullet under text instead of another bullet - If you wanna use rollups more effectively, I’m working on a comprehensive guide to 3 types of dataview rollups this week, it’ll be here once it’s done Comprehensive Guide - How to do dataview rollups in obsidian for that.

The most basic version of the meta-templater is just (trigger-name of file). When you click on it, the template opens. You can add functionality by auto renaming and moving to a different file. I basically extract the name of file removing the trigger phrase, then add back like the file type and maybe a date if it is the kind of note that has versions. It can even fill in dataview tables for you! You put the title in dataview tables and then (you can search for everything that calls this note, if this note is supposed to be a page tracker)

You have to put the await before renaming or it won’t work. Moving is essentially like changing the path + renaming. You can keep the title if you want but I definitely don’t reccommend it because then it would be super weird if you call the same template with different trigger phrases (for example, I use both reflect and think for my journalling reflection templates)

Tip 3: The renaming moving function can cause these empty templates with the original name of the file, get the “File Cleaner” plugin and just click on the trash icon to clear them away.

More advanced is a dataview prompt in your meta-templater, credit to Komma from the forums for the snippet I based this on and links to Templater documentation below. So I have prompts for my zettelkasten, and this allows me to just define the kind of sub-note type it is under like all possible types of zettels I could have had. I also do this for meeting notes (I have a few fixed type of meetings) and source notes (which is like all my reading notes).

You have the include the prompt note in your meta template picker and then instead of a template, you have more templater code in the prompt note.

Tip 2: open this in a code editor where you can see the code syntax instead of squinting at obsidian. I am using sublime text here with the javascript syntax coloring.

You can just have two of the same list here, this is what you see and what it defines the filetype variable into. The filetype variable is basically the trigger phrase. Then false says that you don’t want to throw an error if you quit the prompt instead of pressing one of the templates. Then the last string is just what you want it to show.

Then the code below is basically the same as the meta-templater picker, where templater picks based on the trigger phrase. This is kinda like a nested meta-template picker but good for when you vaguely remember the category - this is a reading note or a zettel etc but like don’t want to interupt your thinking for metadata clarification.

Tip 3: see these dashes? they are used to remove white space and like crucially importantly to avoid the weird blank line of white space before your actual template content.

Ok so what kind of templates to have?

Firstly, I recomend that you have a tester template phrase for testing cool new template stuff, and when you are making your own meta picker, you can just use the tester template as your default so everytime you press new file, you can test whether your changes are working.

Secondly, put your default inline dataview fields for page property in your default note. You can even have a template for templates :) Do remember to move all the templates you make for the meta-templater into the templater templates folder.

Description

Hi! I’m Pamela, and this video is about how to make a trigger based meta-templater, which helps auto-trigger templates based on the name of the link. This is the most useful mod I have ever done for my obsidian vault :) and I also show how I use my meta-template picker for tag based organization.

FREE STUFF Potato Vault V2 https://github.com/Pamela-Wang/Obsidian-Starter-Vaults this version has MetaTemplater (shown in this video) and Automated Weekly Review system setup (See https://youtu.be/tUWjyzvljfs for details on that) Clean Title Javascript Code (https://github.com/Pamela-Wang/Obsidian-Starter-Vaults/blob/main/Potato%20Vault/90%20Meta/92%20Plugins/Templater%20Scripts/getTitleSnippet.js) This is part of the Potato Vault V2 but for people adding to their own vault, you can just copy it separately to your templater scripts folder

WHO AM I I’m Pamela, a PhD student in Singapore. I make videos on productivity and personal knowledge management systems.

SOCIALS Contact me at my twitter @MwahaCookie or you can send an email to MwahaCookie@gmail.com

CREDIT Bryan Jenks - Tag Taxonomy https://publish.obsidian.md/bryan-jenks/Z/Tag+Taxonomy - Inventor of (Symbol based) Meta-Templater Subscribe Button animation - Basic Edit https://www.youtube.com/watch?v=TEjTCQtOgP4 Music from Uppbeat (free for Creators!): https://uppbeat.io/t/soundroll/tropicana License code: SCUEYENPWPL2AEVQ