🧠 Second Brain

Search

Search IconIcon to open search

Add Blog/Book to my Obsidian Vault via Symlink

Last updated Aug 9, 2024

This is a note about how I link my book and Blog to my Obsidian Second Brain Vault. Both of the folders are git repos that usually I edit in a separate Vault or with Neovim. But with Symlinks, thanks to Lazar I linked them directly to my main Vault and I can edit them now from within one single Vault.

Why is this important or how does that help?

It helps me, especially for my book which I write in Markdown and references my second brain notes with plain wiki-links [[]]. I have a script or mdbook-extension that converts automatically all my links from Wikilinks like [[my link]] to my Second Brain links ssp.sh/brain/my-link.

This was already pretty cool. But whenever I renamed a note in my second brain, I had to update my book and do the rename there too. But not anymore, see below.

Also linking my blog into the second brain, only the content part, it’s just so cool to have one single vault for all my heavy writing. Quickly referencing and searching the content I have written in the book or blog is so cool.

Using Symbolic Links to reference my blog inside my vault:

1
2
3
10453  ln -s ~/Documents/git/sspaeti.com/sspaeti-hugo-blog/content content
10458  ln -s ~/Documents/git/sspaeti.com/sspaeti-hugo-blog/static static
10459  ln -s ~/Documents/git/sspaeti.com/sspaeti-hugo-blog/assets assets

Gives me this:

1
2
3
lrwxr-xr-x@  1 sspaeti  staff   65 Aug  8 10:21 assets -> /Users/sspaeti/Documents/git/sspaeti.com/sspaeti-hugo-blog/assets
lrwxr-xr-x@  1 sspaeti  staff   66 Aug  8 10:20 content -> /Users/sspaeti/Documents/git/sspaeti.com/sspaeti-hugo-blog/content
lrwxr-xr-x@  1 sspaeti  staff   65 Aug  8 10:21 static -> /Users/sspaeti/Documents/git/sspaeti.com/sspaeti-hugo-blog/static

# Obsidian

And now in Obsidian I can edit directly my blogs !!!

I created even a Template πŸ•ΈοΈ Blog ssp.sh Template that I set as default in Templater:

Wow, you can even reference them, and finding them with [[]], this is amazing:

# DEDP Book

That means I can write my book inside my second brain vault as well, and even use my wikilinks to my second brain !!!!!!!!!!!!!!

And they even show up in the search!!!!!!:

This is almost too good to be true. And everything is still in its own GitHub, meaning I still see all the changes in case I mess something up.

I’m curious if related links that I use would be updated?

Yes, they do!!!

# Renaming

🀯: If I rename the linked note in my obsidian vault, the links in my DEDP book get renamed as well!

E.g. for the blog and book, it actually syncs all the notes to Obsidian Sync, because for Obsidian these are normal files. Meaning I even have them on mobile!

Attention

So if I change them on my mobile, they might conflict with what I have on my machine. Not sure if Obsidian sync will then overwrite what has been stored on the local disk, i need to test, but probably yes.

  • so the best thing to change these on the computer as there is only one file and hopefully obsidian sync is not conflicting.
  • But we’ll see. I always can revert back to Obsidian Sync, and also in Git.

Update after Tests:
It, seems to work quite well between sync mobile and my computer. At least if the Macbook is connected and syncs it directly to the file system. Maybe it’s different if the Mac is offline, changes are made on mobile and then I’d change without a second brain vault, but the book vault

More on how I publish my second brain publicly see Public Second Brain with Quartz.


Origin: A lazy man’s Obsidian + Astro workflow integration - YouTube
References:
Created 2024-08-08