I have used pretty much every modern note taking app at this point. https://roamresearch.com started the addiction back when I was in my undergrad, then I moved onto https://foambubble.github.io/foam/ when Roam Research got too expensive for me. I was never really productive in these apps until I started to use https://logseq.com. It uses an outliner which really helps me take notes, and the fact that notes can be accessed by folder paths works with my brain really well. Taking a note a adding [[Leadership/people/Greg Hirsch]]
really makes sense to me.
Unfortunately Logseq isn’t doing much anymore and is investing in tools that I don’t want to use. So now I’m on everyones favorite option, https://obsidian.md. Its an amazing tool, I just haven’t been able to make it exactly how I want it, but maybe I’m the one that needs to change.
I do have a more formal Ghost Blog https://notes.ansonbiggs.com/ but I find it hard to mix wanting to ramble about a small project, and keeping it a polished site. I find that I’m creating something thats the worst at both. So, I’m going to start publishing really rough writings here, and if it comes together enough I’ll post it over there.
Needs
Before I write too much I just want to put down what I need from my Brain:
- Easily take notes on desktop or mobile
- For now this means I need Obsidian
- This means my vault needs to sync on iCloud
- Publishing needs to be opt-in
- Publishing needs to be completely automatic
- My data needs to stay secure
Publishing Setup
Not everything I write can or should be posted. I’m currently looking for a job, and some of the notes I write about companies are absolutely not public. So I need a setup that lets me opt-in, and doesn’t get in the way of actually doing work.
https://quartz.jzhao.xyz quartz is an incredibly well made static site generator for publishing your Obsidian vault, with the one tiny exception that your vault has to live inside of its codebase. This is a little odd but something I can work around, being that my vault lives in iCloud I definitely cannot but a Node.js project inside of it. I’ve made this mistake in the past and the absurd amount of files that get generated jam up your entire filesystem.
So, I need two repos:
graph TD vault[Obsidian Vault] iCloud private[Private GitLab Repo] publish[Public Quartz Repo] pages[GitLab Pages] vault -- Git Extension on Desktop --> private vault -- Auto sync between personal devices --> iCloud iCloud --> vault private -- Downstream Pipeline --> publish publish -- Git Submodule --> private publish --> pages
Downstream Pipelines are really cool, it means that in my private vault repo I just need the following CI:
trigger_job:
trigger:
project: MisterBiggs/brain-quartz
which will trigger the full job on my quartz repo.
The nasty part of this is the Git Submodule. I really hate this feature, but for this I think it makes the most sense. This way GitLab handles all the permissions and I don’t have to worry about accidentally leaking artifacts. An alternative solution I could think of would be to have my private repo publish a private zip file that the quartz repo could then grab, but thats way more work. I like keeping the entirety of the complexity of the publishing in the quartz repo. With the current approach the only way you can tell this repo is a website is the index.md file at the root, and the gitlab-ci.yml
file.
Failure
Git Submodules ended up really falling apart for this project. I almost suspect it was a GitLab bug but no matter what I did my runners would only pull a specific commit from right before I moved the repo to another namespace.
I found it easier to just git clone my Brain
git clone --depth 1 git@gitlab.com:Anson-Projects/brain.git content
, which can be seen in the latest version of the brain-quartz repo.This makes it so that you don’t need to learn any submodule commands to test things locally, and quartz is still able to get dates from git no problem so I think this is the correct solution.
The quartz code can be found here: https://gitlab.com/MisterBiggs/brain-quartz
Shout to to Oliver for pointing out this trick https://oliverfalvai.com/evergreen/my-quartz-+-obsidian-note-publishing-setup#dead-link-checker
npx linkinator --recurse --silent http://localhost:8080
This grows the gitlab-ci.yml a bit:
trigger_job:
trigger:
project: MisterBiggs/brain-quartz
strategy: depend
validate_links:
stage: test
image: node:latest
script:
- npm install -g linkinator
- npx linkinator --recurse --silent https://brain.ansonbiggs.com
needs: ["trigger_job"]
allow_failure: true # Include if you don't want the emails on failures
This means that even if there are bad links, the pages will still update. Which is what I want since I don’t want to have any friction with my writing. I’ll try to occasionally check this, but no promises.