🧠Second Brain
Search
Public Second Brain with Quartz
This is my documentation of how I publish my notes from a private Obsidian vault to my Public Second Brain with open-source Quartz and GoHugo.
# Journey of Publishing Notes
I had several iterations. I used to have an HTML/CSS/PHP website, moved to a traditional blog with WordPress, and now have a Static Site Generators (SSG)-blog with GoHugo and a Second Brain (where you read this note) with GoHugo/Quartz.
On this page, I elaborate on how I can simply write in my Obsidian Vault, add #publish
anywhere in my note, and run make deploy
and it’s published on my public brain. No conversion, no extra formatting, no nothing needed, just running a make file.
I can write offline, on my mobile phone, or wherever I want; Obsidian will sync it across. Publishing will happen on my laptop (running the make deploy
, which essentially does a rsync to my web hosting).
# Publish
How do I publish? There are two steps.
- I added a Python script
find-publish-notes.py to the
Makefile to copy all my SecondBrain notes from my Obsidian Vault with the hashtag
#publish
and copy it into the Quartz git-repo.- Since 2023-06-07: I switched to a
Rust-script that does the same but adds #hashtags properly as Hugo requests, and it is 30x faster. To get the Rust executable, you need to run
cargo build --release
from within theutils/obsidian-quartz
folder.
- Since 2023-06-07: I switched to a
Rust-script that does the same but adds #hashtags properly as Hugo requests, and it is 30x faster. To get the Rust executable, you need to run
- I ran the
make deploy
that syncs the changes to my website. This command copies notes with the hashtag “publish” and deploys to brain.ssp.sh. See also more in below .- Since I use GitHub, I could also create a GitHub Action to deploy on commit. But I actually prefer to run the make file.
Quartz v3 Workaround
I copy all my Zettels in the root folder instead of adding sub-folders in Quartz. This way I can use Wikilinks
[[]]
and do not need to change to absolute paths - which I do not want to activate in my Second Brain.
# Deployment
Here I describe how I deploy my second brain.
# Self Hosting
I self-host on my own server as I already have hosting for my website. The only thing I do I rsync
the public
-folder to my web hosting, that’s all. The
script shows how I do it. The actual line is rsync -avz --delete public/ USER@DOMAIN.com:~/www/brain
(just replace with your user and domain).
# GitHub
If you do want to use GitHub actions, you can check the Data Glossary (glossary.airbyte.com) which is the same setup as Quartz, but there we use GitHub. Checkout the required deploy.yaml that makes the magic work
Basically, when someone changes the branch hugo
, it will deploy changes to master
branch and publish that. I think I wrote some more details
here.
# Adding an Image (Front Matter)
I added the option to overwrite the header image, and its width and height for each note, as well as the description. E.g. in the Frontmatter I can now overwrite the terms with:
|
|
# Uploading Example
# Long-form example of how I publish to Quartz
Link: My Obsidian Note-Taking Workflow - YouTube
# Short Asciinema Video
# See Other Public Brains
Origin:
References: GoHugo Static Site Generators (SSG)
Shared on SH: Hackernews
Created 2022-08-20