Deploying an Obsidian Digital Garden to GitHub Pages
I wanted to create a Digital Garden using Obsidian and found the amazing oleeskild/obsidian-digital-garden plugin.
The plugin, however, was initially thought to deploy webpages on Vercel / Netlify. However, for a variety of reasons, I prefer to use GitHub Pages -- mainly because of the limitations of these deployment platforms.
I did not find a lot of tips on how to adapt the deployment from Vercel / Netlify to GitHub Pages, so I found a little hack I decided to share as one of my initial notes in my Digital Garden.
Deploying on GitHub Pages
- First of all, follow their instructions - You need a working Obsidian Vault connected to your GitHub Digital Garden repo, before proceeding.
- In your GitHub repository settings, go to the "Pages" section.
- Set the source to the branch containing your notes (e.g.,
main
) and the folder to/ (root)
. - GitHub will automatically build and deploy your site. However, the page you see when you go to your
<digitalgardenreponame>.github.io
should be your READ.ME. Now here comes the hack - In your Digital Garden repo, go to
src/site/notes/
and open your home page note (the one you published during their instructions) - Replace the
/home/
string by/
- Wait for your GitHub page to reload. You should see your home page note as your
github.io
home page now.
I hope this might have helped someone on the internet to create their own digital garden using GitHub Pages :)
Thanks for reading.