If folks are interested in this workflow, but want to auto-sync their changes to a GitHub repo, I’ve been maintaining a VS Code extension for managing code snippets, and notes/Roam-like wikis, and it includes full Foam interop:
https://aka.ms/GistPad.
https://twitter.com/lostintangent/status/1282047676377231360...
https://twitter.com/lostintangent/status/1334225746751983618...
https://twitter.com/lostintangent/status/1282850227695652865...
I built this so that I could manage my knowledge in GitHub, but edit my notes like I would with Notion/OneNote (i.e. commit/push on save). It also supports managing code snippets via gists, since I’ve found that my personal knowledge is composed of notes and code snippets, and I wanted a single, editor-integrated solution for managing them both.
Foam + GistPad recipe: https://foambubble.github.io/foam/recipes/write-your-notes-i...