Can you please share some of your templates?

@sanyam

Daily Note Template


<%*
  let title = tp.file.title
  if (title.startsWith("Untitled")) {
    title = await tp.system.prompt("Title");
    await tp.file.rename(title);
  } 
  tR += "---"
%>
Title:  <%* tR += title %>
Tags: daily/journal/<% tp.date.now("YYYY/MM/DD") %>

---
## <%* tR += title %>
[[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] <<>> [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]] 

### Notes
- 

#### Recent Notes
```dataview 
List
from ""
WHERE file.mday >= date(today)
SORT file.mtime desc

Projects Board

![[:vertical_traffic_light:Projects Board]]

:crescent_moon: End of Day

  • [x] Daily Reflection [[<%* tR += title %> Reflections]] [completion:: 2022-01-26]
  • [x] Sweep OmniFocus [completion:: 2022-01-26]

![[<% tp.date.now(“YYYY-MM-DD”, -1, tp.file.title, “YYYY-MM-DD”) %> Reflections]]

Rolled Over Tasks

![image|231x500](upload://xg62khE7UglhYH9ZQohi8HGqxYp.jpeg)
5 Likes

@sanyam

This is my very simple quick add template - the top part just makes it so if the note has not been title yet it’ll prompt you for the title, if title already made (say by making the note link in a note than clicking on it) it’ll just format the title for you.

the tp.file.cursor(#) are just a quick snippet so when note is created and editing - hitting option + tab will take you right to each of those in order. Just a little extra thing to making filling in the info really quick.

as you can see - i have two of them inside [[]] - that’s just for me to make sure i link it to another note or too and helps me keep that quick side research, jotting quick notes from being lost to the abyss.

(it also automatically creates a link to the daily note which is located right under the Yaml and title.


<%*
  let title = tp.file.title
  if (title.startsWith("Untitled")) {
    title = await tp.system.prompt("Title");
    await tp.file.rename(title);
  } 
  tR += "---"
%>
Title:  <%* tR += title %>
Created: <% tp.date.now("YYYY-MM-DD") %>
---
 [[<% tp.date.now("YYYY-MM-DD") %>]]

 [[<% tp.file.cursor(2) %>]] << >> [[<% tp.file.cursor(3) %>]]
 
---
<% tp.file.cursor(1) %>

3 Likes

Thank you so much! I’ll try that out, really appreciate it!
Figuring out how to code it myself is too much complexity, but it’s pretty easy to copy/paste haha

Edit: This doesn’t seem to be working, do I need to have a specific plugin active or should it just work with base Obsidian? I replaced the top stuff on my daily note template with the string you gave me and created a new daily note but it just shows the code as links to pages that don’t exist rather than filling it in with the correct date info.

@maawolfe36

my apologies - So I am pretty sure you need the “Templater” plug-in.

(And TURN-OFF “Templates” plug-in when turning on “Templater”)

For me, i’ve always viewed it as Templates with the “option” of steroids, so shouldn’t complicate anything.

attached a picture of one of “Templaters” settings - as it explains allows use with Daily Notes (also really good documentation with that plug-in, with examples you could copy and paste with literally only changing, say the #tag.

2 Likes

May I ask what is the benefit of using the YAML tagging system instead of the build-in Obsidian tags? Thanks :slight_smile:

1 Like

I liked separating my type and status tags from my topic and keyword tags. I put one kind in YAML and the other kind in the note.

No difference. Just a preference.

1 Like

this is my daily notes template

2 Likes

Has anyone built a template that grabs a string from another file and presents it? Like a random string. Thinking - self reflection question but not the same question each day. It’d randomly present a question from a curated list of questions.

1 Like

I use shortcut keys, another option: Ctrl+; for yesterday, Ctr+’ for today (I have Obsidian open to today’s Daily Note, so that is for when I’m elsewhere), Ctrl+# for tomorrow.

Works really well, that’s the right-side Ctrl key with three keys side by side two rows higher (basically, depending what keyboard you use in what part of the worls, I use the ‘non-letter’ bunch of keys above the right side Ctrl key for shortcuts)

Edit: the shortcuts don’t create the notes, they only scroll through already existing Daily Notes. They are hotkeys I’ve nominated.

To adapt to your context :slight_smile:

Fasting template

---
aliases: []
---
#health
# Related
- [[Fasting]]
- [[Health]]
- [[My health goals]]
# TODO
> [!TODO] TODO
# {{title}} - {{date}}

**Date:** {{date}}

The situation/context:

## Metrics

|                    | -24h | +24h | +48h | +72h+ | break +24h |
| ------------------ | ---- | ---- | ---- | ----- | ---------- |
| Energy             |      |      |      |       |            |
| Happy              |      |      |      |       |            |
| Anxious            |      |      |      |       |            |
| Ouraring readiness |      |      |      |       |            |
| Ouraring sleep     |      |      |      |       |            |
| Ouraring heart rate  |      |      |      |       |            |

Press cmd+shift+O to insert daily ouraring scores.

## Insights

Startup template

---
aliases: []
---
#business #idea 
# [[Epistemic status]]
#shower-thought #to-digest 

# Related
- [[Ideation]]
- [[Cofounder ideation hackathon]]
# TODO
> [!TODO] TODO
# Start-up idea

## Problem/opportunity

## Solution

## Markets/customers/users

## Why

- Popular:
- Growing:
- Urgent:
- Expensive:
- Mandatory:
- Why do you want to solve this problem?
- Unfair advantage:

Life areas template

---
aliases: []
---
#personal-growth #personal 
# [[Epistemic status]]
#shower-thought #to-digest 

# Related

# TODO
> [!TODO] TODO
# Life areas

| Name                                      | Rating | Changable | Focus for now | Meaning                                                                                                                                              |
| ----------------------------------------- | ------ | --------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Health Introspection                      |        |           | No            | Examining one's physical health, such as diet, exercise, and lifestyle choices.                                                                      |
| Time Introspection                        |        |           | No            | Examining how one chooses to spend their time, and identifying potential improvements.                                                               |
| Information Introspection                 |        |           | No            | Examining and evaluating the information one consumes, as well as how it is used.                                                                    |
| Nutrition Introspection                   |        |           | No            | Examining what one eats, and how it affects their health and wellbeing.                                                                              |
| Idea Sharing Introspection                |        |           | No            | Examining how one shares ideas and information with others, and how it can be improved.                                                              |
| Personality Introspection                 |        |           | No            | Examining one's personality traits and habits, and exploring ways to make them more effective.                                                       |
| Sleep Introspection                       |        |           | No            | Examining one's sleep patterns and habits, and exploring ways to improve them.                                                                       |
| Transportation Introspection              |        |           | No            | Examining one's transportation habits and exploring ways to make them more efficient.                                                                |
| Purpose Introspection                     |        |           | No            | Examining one's sense of purpose and how it relates to their life goals.                                                                             |
| Career Introspection                      |        |           | No            | Examining one's career aspirations and exploring ways to achieve them.                                                                               |
| Team Introspection                        |        |           | No            | Examining how one works with a team, and exploring ways to be a more effective member.                                                               |
| Skills Introspection                      |        |           | No            | Examining one's skills and knowledge and exploring ways to develop and enhance them.                                                                 |
| Impact Introspection                      |        |           | No            | Examining one's impact on the world and exploring ways to make it more positive.                                                                     |
| Fitness Introspection                     |        |           | No            | Examining one's physical abilities and motivations, such as physical health, body image, and exercise                                                |
| Productivity Introspection                |        |           | No            | Reflecting on one's ability to achieve goals and accomplish tasks                                                                                    |
| Knowledge Introspection                   |        |           | No            | Analyzing one's intellectual abilities and understanding of the world                                                                                |
| Behavioral Introspection                  |        |           | No            | Examining one's patterns of behavior and their consequences                                                                                          |
| Meta Cognitive Introspection              |        |           | No            | Thinking about one's own thought processes and how to improve them                                                                                   |
| Goal Setting                              |        |           | No            | Establishing and working towards short and long term objectives                                                                                      |
| Relationship Introspection                |        |           | No            | Assessing one's interactions with other people and understanding of social dynamics                                                                  |
| Values Introspection                      |        |           | No            | Evaluating one's personal values and their impact on one's life                                                                                      |
| Financial Introspection                   |        |           | No            | Reflecting on one's financial habits and understanding of money management                                                                           |
| Family Introspection                      |        |           | No            | Examining one's relationships with family members and how their lives intertwine                                                                     |
| Emotional Introspection                   |        |           | No            | Analyzing one's emotional state and understanding of emotional responses                                                                             |
| Community Introspection                   |        |           | No            | Examining one's involvement in and understanding of their larger community                                                                           |
| Environmental Introspection               |        |           | No            | Thinking about one's relationship to the environment and their impact on it                                                                          |
| Appearance Introspection                  |        |           | No            | Reflecting on one's physical appearance and understanding of beauty standards                                                                        |
| Conmunication Introspection               |        |           | No            | Examining one's ability to effectively communicate with others                                                                                       |
| Sex Introspection                         |        |           | No            | Analyzing one's understanding of sex and sexual relationships                                                                                        |
| Leisure Introspection                     |        |           | No            | Examining one's own thoughts, feelings and behavior while engaging in leisure activities                                                             |
| Life Work Introspection                   |        |           | No            | Reflecting on the amount of effort and energy put into one's work, and other aspects of life, as well as the rewards and consequences of such effort |
| Privacy Introspection                     |        |           | No            | Examining one's own thoughts and feelings about the level of privacy they have, or the lack thereof                                                  |
| Safety Introspection                      |        |           | No            | Examining one's own thoughts, feelings and behavior while engaging in activities that involve risk or potential danger                               |
| End of Life Introspection                 |        |           | No            | Reflecting on one's own mortality, and how their life would be viewed by others after their passing                                                  |
| Self Introspection                        |        |           | No            | Examining one's own thoughts, feelings and behavior, and reflecting on the impact of such thoughts, feelings and behavior on one's self-image        |
| Everything Else Introspection             |        |           | No            | Examining one's own thoughts and feelings about the world, and everything else that isn't covered by the other introspections                        |
| Legal Introspection                       |        |           | No            | Examining one's own thoughts and feelings about the legal system, and the laws and regulations                                                       |
| Philosophy Introspection                  |        |           | No            | Reflecting on the fundamental nature of reality, knowledge, and how one should live                                                                  |
| Societal Introspection                    |        |           | No            | Reflecting on the values and norms of a society, and how they influence individuals and communities                                                  |
| Consciousness Introspection               |        |           | No            | Reflecting on one's innermost thoughts and feelings, and how they shape one's world view and understanding of the world                              |
| Brand Introspection                       |        |           | No            | Reflecting on how a business is perceived by the public, what it stands for, and how its products and services are viewed by its customers           |
| Conjectures and Refutations Introspection |        |           | No            | Reflecting on the assumptions and evidences that make up a theory or idea, and whether or not they are valid in the context of the whole argument.   |


Decision journal template

---
aliases: []
---

# Related
https://fs.blog/decision-journal/
# TODO
> [!TODO] TODO
# {{title}}


**Date:**

**Time:**

**Decision:**

**Mental/Physical State**


|                    | 0/100 |
| ------------------ | ----- |
| Energized          |       |
| Focused            |       |
| Relaxed            |       |
| Confident          |       |
| Tired              |       |
| Accepting          |       |
| Accomodating       |       |
| Anxious            |       |
| Resigned           |       |
| Frustrated         |       |
| Angry              |       |
| Ouraring readiness |       |
| Ouraring sleep     |       |
| Ouraring activity  |       |


The situation/context:

  

The problem statement or frame:

  

The variables that govern the situation include:

  

The complications/complexities as I see them:

  

Alternatives that were seriously considered and not chosen were:

  

Explain the range of outcomes:

  

What I expect to happen and the actual probabilities are:

  

The outcome:

  

Review Date (6 months after decision date):

  

What happened and what I learned:
2 Likes

With my expanding number of templates (general note, daily, literature, video, etc.), I got tired of changing the YAML/frontmatter in each one as my YAML preferences changed over time. Now I use a header template that I change once and is inserted into all newly created templates/notes. Some people like to have different YAML depending on the type of note, but I like to keep it mostly the same (at the moment anyway). I’ll add something here or there if needed. This uses the TemplatER community plugin.

Create a x-header template (named x- to keep it at the bottom of the template modal list, but of course can be anything you want) with your current YAML preferences.

---
created: <% tp.file.creation_date("dddd MMMM Do YYYY HH:mm:ss") %>
alias: []
tags: []
state:
more YAML..
as much as you can endure....
---

Now, in all your other templates, put tp.file.include at the top and add whatever else is needed below per template (For example, here’s a sample book template).

<% tp.file.include("[[x-header]]") %>

# <% tp.file.title %>

Author: [[Author Name]]
Type: [[Books]]
Related: %% Links to pages not referenced in the content %%

## Summary

## Notes

## Quotes

## Questions

## Terms

Change x-header, all newly created notes made from your different templates pick it up! :+1:

5 Likes

Love the “re-writing” of the Eisenhower matrix!

1 Like

(need dataview)

human CRM

Timed interactions with humans (professional or personal)

human map of territory

Your understanding of X person’ personality, links to recent talks, etc

1 Like

Yes, inspirational TY

They are basic templates but it’s the point of this project.

2 Likes

My main template is:

<%*
  let default_title = tp.file.title;
  let title = default_title;
  if (title.startsWith("Untitled")) {
    try{
	    title = await tp.system.prompt("Title");
	    if(title==="" || title === null){
		    throw new Error("Title is empty or null!")
	    }
    }
    catch(error){
		console.error("Enter or Esc was pressed on prompt:", error)
	    title = default_title;
    }
    finally{
	    await tp.file.rename(`${title}`)
    }
  } 
  tR += "---"
%>
created:<%tp.date.now("YYYY-MMM-DD")%>
---

<HR style="border-color: RGBA(139, 108, 239 ,0.75)">

<%tp.file.cursor()%>




<HR style="border-color: RGBA(139, 108, 239 ,0.75)">

[[## SYSTEM TAGS|]]
#<%title[0].toUpperCase()%> 

I added some try-catch block in the begining of my template, because if I trying to rename title and pressed just Enter(title=“”) or Esc(title=null), template not working, obsidian creates just some empty file.
So now tempate is working how I want)

2 Likes

created a github repo for this, this scales better imho GitHub - louis030195/awesome-obsidian-templates: a collection of obsidian templates

1 Like

Isn’t that somewhat overcomplicated? Wouldn’t the following do just the same?

<%*
  let title = tp.file.title
  if (title.startsWith("Untitled")) {
    title = await tp.system.prompt("Title")
    if (title==="" || title === null){
      console.error("Enter or Esc was pressed on prompt, will use default title")
      title = tp.file.title 
    } else {
      await tp.file.rename(title)
    }
  } 
  tR += "---"
%>
created:<%tp.date.now("YYYY-MMM-DD")%>
---
... The same from here ...

As far as I can tell there is no need for that extra exception stuff with throwing and catching and finally stuff. Keep it simple, if you can.

1 Like

I see this in several templates: tR += "---".
Why not just put it as part of the template text? I mean outside od the templater section

You could, and I believe it’s a matter of convenience and habits. To me it kind of serves as a reminder that I’m within a javascript block, and it’s often optional whether I’m wanting to output the dashes or not, and as such I like to have it within the block.

But in some cases, like the one above, it could indeed be outside of the javascript block.