[Obsidian Publish] "Edit this page" button

Use case or problem

I am planning to host my Obsidian vault in GitHub, so that I can create a shared digital garden (aka public wiki) that anyone can contribute to.

However, since Obsidian Publish works from your local files, it hasn’t been designed with GitHub-hosted wikis in mind. One thing GitHub-powered wikis like Docusaurus benefit from is a link to the source file in GitHub, making the UX for edit suggestions very easy – readers of the wiki just need to click the “Edit this page” button to immediately start suggesting edits.

Adding this feature (along with search, which is coming soon), would make Obsidian Publish a more viable competitor to Docusaurus and similar wiki/documentation solutions.

Proposed solution

Allow us to specify in the Publish “Site options” a URL path to where our vault is being hosted (e.g. in GitHub). Obsidian should then be able to automatically generate the URL to send someone to when they click the “Edit this page” button, based on this specified URL path and the file path known to Obsidian.

For example, if the specified URL path was “https://github.com/org/repo…”, and the Obsidian Publish URL was “https://publish.obsidian.md/vault/File+name”, the autogenerated edit URL would be “https://github.com/org/repo/blob/master/File%20name.md

A note on discouraging edits outside of the Obsidian app

I recognize the desire to discourage edits taking place outside of the Obsidian app. However, requiring someone to install the Obsidian app, clone the repo, point the Obsidian app to the local repo, make the edit, then submit a PR, is too much of a barrier for my public wiki use case.

I plan to enforce the best practice of not creating wiki-links or editing note titles outside of Obsidian by simply rejecting any PRs that attempt to do this.

5 Likes

Did this request get anywhere?

Not that I’m aware of. Normally the mods do a good job of archiving features when they get resolved in a new version, so I’m sure we’ll find out if/when this feature gets added.

Check out how they do this with GitHub actions: 00 - Start here - Obsidian Publish