Making Your First Schema
As you write more notes, you might find yourself re-using the same template across multiple notes. You can use schemas to automatically apply a template to notes at a given hierarchy.
- Schemas are cross vault. If you have multiple schemas with same starting pattern, the last schema loaded takes precedence.
- Every level in the schema needs to have children
Daily journal notes
Daily journal notes are special notes meant to easily track your everyday life. Dendron also has a built-in Calendar View that helps you visually navigate and create new journal entries.
Templates are notes with pre-outlined content meant for reuse. Templates can either be inserted into an open note with
Dendron: Insert Note, or automatically applied at note creation with Schemas. These are meant to reduce friction in the creation of new content, providing standardized outlines to your notes.
Schema help you apply consistent structure to all your notes.
As you end up creating more notes, it can be hard to manage them at scale. Think of schemas as an optional type system for your notes that describe the hierarchy of your data and are represented as a hierarchy, themselves.
One of the primary capabilities for schema is to automatically insert templates into new notes.
Create 5MJ template
Open lookup (
templates.daily-5mjin the text prompt and hit enter to create the template
Copy and paste the following markdown:
<!-- Based on the journaling method created by Intelligent Change: - [Intelligent Change: Our Story](https://www.intelligentchange.com/pages/our-story) - [The Five Minute Journal](https://www.intelligentchange.com/products/the-five-minute-journal) --> ## Morning <!-- Fill out this section after waking up --> ### Gratitude I am grateful for: 1. 2. 3. ### What would make today great? 1. 2. 3. ### Daily affirmations I am... ## Evening <!-- Fill out this section before going to sleep, reflecting on your day --> ### Amazing things that happened today 1. 2. 3. ### How could I have made today even better? I could have made today better by
- Save the file.
You now have a new template with the 5MJ outline.
Create 5MJ schema
Templates can be used with or without schemas. Run Insert Note to insert a template into the currently opened note.
- Open schema lookup (
5mjin the text prompt and hit enter to create the schema, which should look like the following:
version: 1 imports:  schemas: - id: 5mj children:  title: 5mj parent: root
Update 5MJ schema contents
We are going to use Inline Schema, which is a simpler form of schema taking less configuration lines while using indentation for visual understanding.
- Replace the content of
5mj.schema.ymlwith the following:
version: 1 schemas: # Daily is the top most schema since its parent is 'root' it must have an identifier # this identifier 'daily' will be used when using 'Lookup (schema)' command. - id: daily parent: root title: daily desc: "" # Children of the top most schema do not need to contain identifier and just # require a 'pattern' to be set to match the hierarchy of notes. children: - pattern: journal children: # This pattern matches the YYYY (year) child hierarchy - pattern: "[0-2][0-9][0-9][0-9]" children: # This pattern matches the MM (month) child hierarchy - pattern: "[0-1][0-9]" children: # This pattern matches the DD (day) child hierarchy - pattern: "[0-3][0-9]" # As with regular schema we can set the template to be used with # the match of our notes. Below is an example usage of shorthand template # definition (which defaults to type: note). desc: Five Minute Journal template: templates.daily-5mj
pattern attribute is using a Glob Pattern, which is an expression used to match ranges and combinations of characters.
To match with the daily journal structure:
[0-2][0-9][0-9][0-9]means match the range
0000 - 2999
[0-1][0-9]means match the range
00 - 19
[0-3][0-9]means match the range
00 - 39
This means all new daily journal notes are the pattern ranges.
Create a new daily journal
Creating a daily journal entry should result in the
templates.daily-5mj template automatically inserted.
Create Daily Journal Note(
You should see a new daily journal note with the 5MJ template inserted.
After doing this, you've now:
- Created a 5MJ template
- Created a 5MJ schema
- Created your first daily journal with the 5MJ template applied via schema
- Learn to swiftly create schema targeting existing note hierarchies
- Learn to level-up your daily life with the bullet journaling workflow
- Learn to explore your schema visually using the schema graph
- Check out an end-to-end workstyle, managing 20k notes, using schemas and daily journals from A Day in Dendron