I just found out that Obsidian’s markdown syntax is super close to Github Wiki/MediaWiki flavor markdown, see github docs.
To get it working:
create a Github repo wiki
clone it
point Obsidian to that directory
edit/commit/push/pull as needed.
However shere’s a some weird compatibly things I’ve found:
When pasting images, it does ![[imagename]], but Github wiki renders an image with a leading ! because it renders the image directly from the [[ bracket, rendering the exclamation mark.
When Obsidian adds assets like images, files, etc, it’s link is just it’s file name. Github serve files using a relative path, but Obsidian always served from the root path /. Storing assets in a folder like /assets doesn’t really work on Github.
Adding named links syntax in Github pages is reverse of Obsidian
Obsidian
[[fileName|linkTitle]]
Github
[[linkTitle|fileName]]
Otherwise, this is pretty cool workaround for hosting your Obsidian files
Sorry for the bump, but I did not see any more suitable place.
I have made a git hook as an attempt to solve this problem, see here.
The idea is to maintain two branches, for example “obsidian” and “main”. The obsidian branch has md files in obsidian style. When obsidian branch is committed to, a git hook merges the changes to the main branch (This is the one supposedly used by the github wiki). The hook transforms the links in the main branch, commits the results and checks out the obsidian branch again.
This is just and experiment, comments very welcome!