Github Wiki kinda works to host the wiki!

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

7 Likes

It would be amazing if the Obsidian Team, allowed us to use it together with Github WIKI, making this small adjustment.

1 Like

Actually a lot of the problems are fixed now when you change the Files & Links > New link Format to Absolute path in vault or Relative to file.

Optionally turn off Use [[Wikilinks]].

2 Likes

Can confirm. I store/back up my vault to GitHub, and use the mobile app as my primary viewing app when mobile with the above link settings.

1 Like

Github’s wiki can refer [[Computer Science]] to file computer-science.md.

But in Obsidian, click on [[Computer Science]] will create a new file Computer Science.md no matter computer-science.md exist.

I hope Obsidian supports this in the future. That will attract tons of GitHub wiki users.

1 Like

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!

1 Like