The Requirements

I’ve actually had this idea in mind for a while. In particular, I’ve wanted to use Obsidian on various platforms (my phone, ipad, laptop, etc.) alongside the ability to share notes with friends or have a website to direct to.

  1. Be able to use this scheme on multiple platforms
    1. Requires some form of sync
  2. Be able to access this online
  3. Keep it as low cost as possible

The Ideas

There are a few different options for .md file blog generation/hosting online, but I decided to use quartz since I found it pretty easy to understand and configurable enough out-of-the-box to make me happy. This, alongside github pages, gave me the option to access my notes online.

For syncing, I’ve had my eye on obsidian-git for a while. I find it extremely cool that they’re able to offer this sync type of behavior across platforms (tested so far with my phone and my laptop, which should cover almost 99% of cases for me).

The Problem and The Solution

The first and probably only major issue I ran into was the obsidian-git plugin having some issues with larger vaults. The option to use the entire quartz repo as my vault didn’t work the best, so I decided to extract out my notes vault to a completely separate repo. This ensured that I could keep my vault as lightweight as possible, allowing obsidian-git to sync without issues.

From there, I needed to create a couple of github action scripts + enhancements. The two repos needed to be connected in some way, and while I don’t think it’s the cleanest solution, for now it works. (My experience with github actions has been little to none. Only kinda understood this stuff because I use gitlab actions at work)

The workflow is as follows:

  • Vault repo gets pushed to
  • Vault repo actions triggers the site repo to begin both github actions
  • Site repo actions trigger
  • Site repo actions copy vault repo data over
  • Site repo actions execute to deploy github pages

The Results

For now, I’m happy with this workflow. There are some annoying bits like:

  • needing to remember a “git backup” action via the plugin since I’m concerned about merge conflicts and how the plugin deals with those
  • needing to fix the ui on mobile — the explorer needs to be in a less random place
  • doing hacky things to make this work; I’d like to figure out what the right way to do certain things like this are and eventually implement those

I’m looking forward to being able to jot random things down, either from my laptop or phone, and to be able to share it with whomever, whenever.


2 Years Later

Around 2 years ago, I set this blog site up because I wanted to have a place to jot down things whenever, wherever. Since then, I’ve pretty much used this site for that purpose, albeit less frequently than I would have liked. But for the most part, it’s served me well, so I wanted to revisit this post and discuss a bit more about the workflow that has been set up.

  1. My site is set up using Quartz, which is linked above. Quartz allows you to style your website a bit, and I’ve done that. For example, since I don’t really link my notes together too often, I’ve removed the graph view of notes from my page.
  2. My notes repo is separated from my site repo. This allows me to keep all my notes in a private github repo while my site can stay in a public repo, in case anyone wants to see what I did with the layout. When developing locally, I pull in my notes repo by using git submodule.
  3. The site and notes repo are linked via github actions. I’ve configured a scoped down github token that allows specific access to do stuff, which in my case is triggering actions. A push to the notes repo kicks off the site repo build + publish action. The site repo build + publish action pulls in the notes repo when building. So, essentially, the entire site is rebuilt and published every time I push a commit to my notes repo.
  4. On the client side, I use obsidian to manage my notes repo. In fact, my notes repo is just a dump of the obsidian vault contents. It includes a .obsidian folder that contains any plugins and templates that I want to have carried over across devices.
  5. For the sync from obsidian to a notes repo commit, I use obsidian-git. Obsidian-git allows me to access git commands via the command + P hotkey. Any time I want to save my notes to the notes repo via a commit, I just do command + p -> Create Backup. Assuming everything is set up correctly, this creates a commit to the notes repo and kicks off everything above.
    1. Note: to set up obisdian-git, you need to set up tokens to allow obsidian-git to access the notes repo too. This should be scoped down to just the notes repo and to specific actions as well.
  6. Finally, the site is linked to my domain. This is set up in my cloudflare dashboard, using a CNAME DNS record. This is the only cost to me, so everything I’ve set up here is just ~10 bucks a year for the domain name.

This entire setup was one of the first things I assembled together that I felt proud enough to put out on the internet. Since making it, I’ve written many notes (some published, some private), even though I’ve never considered myself to be a writer. I’m particularly compelled to use this system that I created myself, tailored to the apps/plugins/templates I like to use myself. It’s really given me a proper appreciation for what open-source devs do, and what that title means.