In this article I want to describe my experience with Obsidian. I also include some tips and tricks that can help you turn your Obsidian vault in the best note-taking system ever. Starting from simple note in markdown syntax it is possible to create a full interconnected database in a few simple steps and with little coding knowledge. But before you start reading I want you to remember that the perfect system doesn’t exist! Each configuration should evolve with you to meet your needs.


What’s Obsidian

Obsidian is a knowledge management system based on markdown files and connections with internal links. I already wrote about Obsidian in a previous article:

Essentially, it allows you to write and read notes in markdown and to connect different files with links between different notes. Each link could be added with the double brackets [[link]] and work bidirectionally.

Technical details

Markdown formatting and note linking are only the tip of the iceberg. You can infinitely improve the features by using the plugin, both from Obsidian and the community. I am currently using several plugins like:

  • Autocomplete
  • Calendar
  • Dataview
  • Mind Map
  • Charts
  • Quick Latex
  • Reminder
  • Table of Contents
  • Tasks
  • Templater
  • Zoottelkeeper

We will talk more about these plugins below.

Multi-device synchronization

Obsidian is a multi-device software but could be not easy to synchronize notes. I encounter several problems.

I start with the GitHub synchronization through a private repo but it was very slow and should be done manually. You can also set a periodic and automatic repository push but it will freeze your Obsidian vault. Furthermore, it is not possible to use this sync on mobile iOS devices.

Obsidian multi devices

After that, I tried to move my vault to iCloudDrive that in theory should work both on Apple and Windows devices. This could work but intense use could result in some problems due to the iCloudDrive app in Windows. You may see a lot of duplicates and lose some edits. Obviously, you can also use any cloud service but you will lose the synchronization on the mobile app.

In the end, I switched to Obsidian sync. This was a game-changer! Now I can sync all my notes in real time with also setting, plugins, themes and extra files. You have to pay 10$ per month but you could also slow down the price by paying annually or with a student/academic discount. Of course, the backup is also done automatically as the main directories are located both in iCloudDrive and Onedrive.

My directories setup

I use several folders to separate files.

flowchart 
id.1(((myvault)))
id.1-->id.2[(Daily Notes)]-.->id15(YYYY)-.->id16(MMM)-.->id17(dd)
id.1-->id3(Writing)-.->id.4(My website)
id3-.->id5(Other)
id.1-->id6(Setting)-.->id18(Templates)
id6-.->id19(Scripts)
id.1-->id7(Project)
id.1-->id8(People)
id.1-->id9(University)-.->id20(Lectures)
id9-.->id21(Topics)
id.1-->id10(Resources)-.->id11(Literature)
id10-.->id12(Books)
id10-.->id13(Various)
id.1-->id14(Workout)
classDef default fill:#e8e8e8, stroke:#c2c0c0;

The meaning of this subdivision inside the Obsidian vault will be clear later by referring to the different plugins. The most important folders are the Daily Notes which collect all the daily files subdivided by day, month and year. This allows me to collect in a single folder all the daily new input like new notes, images, pdf or code snippets. This is valid for all new inputs except notes describing people, literature references, books or meetings that have a specific template and an automatic script that moves them to predefined folders.

Daily notes

My daily notes workflow is based on the Obsidian functionality that allows me to create and open notes based on today’s date. Every day I can create the current notes in a folder named as the current day that could also store the new daily input as pasted images or new related notes.

Each daily note is structured in different section as:

  • Tasks
  • Meeting log
  • Daily log
  • Brainstorm
  • Check list
Meeting and daily log
Popup of the logged meeting open on hover
Popup of the daily workout open on hover
Example of tasks

The daily note is essentially automated. The meeting and daily log automatically search in the database and show me the meeting or the workout of the day. On hover, I can se in the popup window of the referred notes with all the details. This is possibile due to dataview, but we will talk about it below.

Furthermore, I can manually add some information on the log section. Obviously every words can be connected with link and related notes. Then I also have a checklist of daily activities that I need to remember.

Snapshot of the daily notes

Tasks

One of the most important section is the one about tasks. It is based on a plugin that allows us to track across the entire vault all the marked element. You can simply mark the task with the tag #task but it is also possibile to add more tag, dates and recurring options. Then you only need to filter in the code block with the following query:

```tasks
```

Furthermore, you can add quite complex query to subdivided task in several arguments or by different deadlines. For instance, I use a quarter based type of task identified by the #Q tag, onother group for examination (#sched), one for my thesis project (#🎓) and another one for my website related topics (#📠). All tasks are structured with a checkbox that allows you to mark them completed manually or by calling the GUI.

```tasks
not done
path includes Thesis
description includes #🎓
```
Tasks not yet complete that refer to my thesis project
```tasks
not done
due before YYYY-MM-DD
description does not include #🎓 
description does not include #sched
```
Tasks to be completed by today excluding those that refer to my thesis or to examination
```tasks
done on YYYY-MM-DD
```
Tasks completed today

Obviously, the date query is update in each daily notes by an automatic template.

Templater

One of the most interesting plugins is Templater which allows me to create pre-formatted notes for different topics. I use several template but the most important are for describing people, meeting, daily notes, books and scientific paper.

Each template include also some information for dataview and database query but we will talk about it below. The main functionalities of Templater are related to the creation of variables and function inside the notes. Furthermore, it is also possibile to manipulate those variables or execute some JavaScript code. For example, from the plugin documentation it is possibile to read the following template:

---
creation date: <% tp.file.creation_date() %>
modification date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %>
---
<< [[<% tp.date.now("YYYY-MM-DD", -1) %>]] | [[<% tp.date.now("YYYY-MM-DD", 1) %>]] >>
# <% tp.file.title %>
<% tp.web.daily_quote() %>

Which, once completed, gives us the following:

---
creation date: 2022-10-31 17:20
modification date: Wednesday 31th October 2022 17:20:43
---
<< [[2022-10-30]] | [[2022-11-01]] >>
# Test Test
> Do the best you can until you know better. Then when you know better, do better.
> <cite>Maya Angelou</cite>

Or a slightly more complex example like the template that I use for people’s descriptions. It allows me to record their company, where they live, email, and other information. Furthermore, it also uses dataview to automatically show a table with all the meeting that I have had with the specific person the note refers to

---
company::
location::
title::
email::
aliases::
languages::
date_last_spoken::
---
# [[<% tp.file.title %>]]
<% await tp.file.move("/People/"+tp.file.title)%>
## Meetings
```dataview
TABLE file.name as "Name",
date as "Date",
summary as "Summary"
from [[<% tp.file.title %>]]
where contains(type,"meeting")
sort date asc
```

So I can create new notes really fast. Furthermore, the notes are related by the meeting and every other info about the person.

At the time of writing it is possible to use a shortcut to insert the desired template in the current note and rapidly complete all the fields. In that way, it is not also possible to have great connected notes, really full of information, but the entire vault is really flexible. In the future, you can change your summary table only by varying the query.

Example of two personal sheet (names pixeled)

Database inside Obsidian

The meeting table inside each personal note is realized due to the dataview plugin. It is a live index and query engine that could help you to transform your vault. The plugin is divided into two main parts: data and query. You can insert data inside each markdown file with a YAML syntax like:

---
field1::value1
field2::value2
---

With the query, you can view the data you want to summarize and also filter it. It works both with DQL (Dataview Query Language, a proprietary SQL-looking expression language) and DataviewJS (a high-end JavaScript API to access the different dataview index).

Meeting log

This features allow me to build several mini database. For example, by remembring the dataview snippet inside the people note it read data from every notes with type::#meeting. This is linked with the meeting template whose header contains the following snippet:

---
type:: meeting
tag:: #meeting
company:: [[ ]]
summary::
date:: [[<%tp.date.now("YYYY-MM-DD")%>]]
---

The previously mentioned query then returns me a table containing all the meetings I had with that person which is automatically updated, as showed in the previous figures.

Charts

I also use something similar to creating a personalized chart based on workout data. I log every workout with information about a single exercise with a self-written code that I will explain in a future article. Inside my Obsidian vault there are several notes for each exercise containing information about reps, series and weight. I can recall data for different exercise and made a daily resume like:

```dataview 
TABLE WITHOUT ID 
exerciseName as "Name",
SxR as "SxR",
max as "Max",
mean as "Mean",
std as "Std"
FROM "Workout" 
WHERE contains(type,"gymExercise") and contains(string(date),"YYYY-MM-DD")
```
SxR Max Mean Std
Military press 5x5 45 44 2
Lateral raises 4x8 12 12 0
Front raises 3x10 10 10 0
Dip 4x8 bw bw 0
Chin up 4x8 0 0 0
Push down 3x12 25 25 0
Push up ced bw 0 0

Or query this data to create animated charts. The previous code works both work both JavaScript and dataview. Furthermore, it used chart.js syntax to render the charts. It is an opensource library for data visualization. It support several types of charts like bar, line, pie, bubble, polar and scatter.

let EX="Squat"; 
dv.header(3,EX);const maxvalue=dv.array(dv.pages('"Workout"').where(p=>p.exercisename && p.exerciseName.path==EX && p.dateNoLink<dv.date("YYYY-MM-DD")+1 ).max );  
const meanvalue=dv.array(dv.pages('"Workout"').where(p=>p.exercisename && p.exerciseName.path==EX && p.dateNoLink<dv.date("YYYY-MM-DD")+1).mean );  
const  mylabel=dv.array(dv.pages('"Workout"').where(p=>p.exercisename && p.exerciseName.path==EX && p.dateNoLink<dv.date("YYYY-MM-DD")+1).dateNoLink);  
const chartData = {    
type: 'line',    
data: {    
labels: mylabel.map(t => t.toLocaleString([], { month: '2-digit', day: '2-digit', year: '4-digit', hour: '2-digit', minute: '2-digit' })),   
datasets: [{    
label: "Max",    
data: maxvalue.values,  
backgroundColor: ['#ba342b'],  
borderWidth:  1  
},{    
label: "Mean",    
data: meanvalue.values,      
backgroundColor: ['#a0ada3'],  
borderWidth:  1  
}]    
}    
}  
window.renderChart(chartData, this.container);  

Drink database

But we don’t just have serious things. I also used these plugins to create a nice database of all the beers I drank, clearly still needs to be updated!

It is based on single note to describe a single beer with a special template.

---
type:: beer
style:: [[beer style]]
manufacturer:: [[Manufacturer]]
country:: 
drunk:: 
---
# [[<% tp.file.title %>]]
**Style**: [[beer style]]
**Colour**: 
**Aroma**: 
**Taste**: 
**Bitter**: 
**Alcohol**: 
**Country**: 
**Manufacturer**: [[ ]]

This template allows me to describe the single beer with several information and to summarize the database into a table. Inside the table I can filter with origin, style, manufacturer, ecc. For each element I can describe the alcohol content, the type of beer, the aroma and flavor, the producer by linking everything together. So I can group the different beers by country of origin, producer, style or color.

Obsidian beer
My beer database

There is no limit to the templates you can create. For example, I also use others for scientific articles and books I read. In each note, I can write info and extract about the referred object. This allows me to link connected information and to create useful summaries both in table and lists style.

Mermaid

Last but not least we can talk about mermaidjs. It is a JavaScript based diagramming and charting tool that renders text definitions to create and modify diagrams dynamically. Well, this is the definitions but let’s see why it is so useful. We first need to introduce it to Obsidian inside the code block and then write the mermaid code.

```mermaid
flowchart TD
    A[Start] --> B{Is it?}
    B -->|Yes| C[OK]
    C --> D[Rethink]
    D --> B
    B ---->|No| E[End]
```
flowchart TD
    A[Start] --> B{Is it?}
    B -->|Yes| C[OK]
    C --> D[Rethink]
    D --> B
    B ---->|No| E[End]

It is very useful to fast draw flowchart only by thinking at the name of the block and linking it to the following one. Literally block1-->block2. This is very fast and useful inside your notes. It is also possibile to create different type of diagram as the sequence diagram, the class diagram and the gitgraph.

sequenceDiagram
    Federica->>Luigi: Hello Luigi, how are you?
    Luigi-->>Federica: Great!
    Federica-)Giacomo: See you later!
sequenceDiagram
    Federica->>Luigi: Hello Luigi, how are you?
    Luigi-->>Federica: Great!
    Federica-)Luigi: See you later!

classDiagram
  direction RL
  class Student {
    -idCard : IdCard
  }
  class IdCard{
    -id : int
    -name : string
  }
  class Bike{
    -id : int
    -name : string
  }
  Student "1" --o "1" IdCard : carries
  Student "1" --o "1" Bike : rides
classDiagram
  direction RL
  class Student {
    -idCard : IdCard
  }
  class IdCard{
    -id : int
    -name : string
  }
  class Bike{
    -id : int
    -name : string
  }
  Student "1" --o "1" IdCard : carries
  Student "1" --o "1" Bike : rides

 gitGraph
       commit id:"A"
       commit id:"B"
       branch mybranch
       commit id:"C"
       commit id:"D"
       commit id:"E"
       checkout main
       commit id:"F"
       commit id:"G"
 gitGraph
       commit id:"A"
       commit id:"B"
       branch mybranch
       commit id:"C"
       commit id:"D"
       commit id:"E"
       checkout main
       commit id:"F"
       commit id:"G"

Theme and graphic design

The last major feature I want to talk about is the possibility of fully personalizing the appearance. I’m currently using the Pine Forest Berry theme, a little different from the default one. I like this theme for the aesthetic color palette with a minimal and calm design. I preferer the light mode and it results more readable then the default one.

Pine Forest Berry theme

But the strong point of Obsidian is the possibility to fully customize the appearance with your own CSS. With the shortcut ctrl+shitft+i you can open the document inspector and fully access the styles. For instance, I’m currently using some custom settings to enlarge the hover window, edit the mermaid rendering and change the color of some typographic styles.

.theme-light{
    --text-highlight-bg: rgba(161, 161, 131, 0.3); 
    --popover-font-size: 11px;
    --blockquote-background-color:  rgba(172, 172, 172, 0.105);
}
.popover{
  --text-title-h1: #b48196;
  --link-color: #c19760 ;
  --blockquote-background-color:  rgba(113, 113, 113, 0.519);
  font-size: 11px !Important;
}
.popover.hover-popover {
  position: absolute;
  transform: scale(0.9); /* makes the content smaller */
  max-height: 700px;    /* was 300 */
  width: 800px; /* was 400 */
  overflow: overlay;      
}
.popover.hover-popover.is-loaded { /* nice shadow */
  border: 1px solid darkgrey;
  box-shadow: 6px 6px 7px #50535c72;
  border-radius: 6px;
}
strong, .cm-strong {
    font-weight: 600;
    color: rgb(123, 60, 142);
  }
.mermaid {
  max-width: 80%;
  overflow: scroll;
}

.mermaid svg {
  min-height:20px;
  width: auto;
}

.markdown-preview-view table {
  display: block;
  max-width: -moz-fit-content;
  max-width: fit-content;
  margin: 0 auto;
  overflow-x: scroll;
  white-space: nowrap;
}