I tested this on SilverBullet v0.10.4 and v2, but it’s pretty new so you may find bugs.
The plugin should be safe to use since I purposely didn’t add any action or
code that could change your pages, you may find problems here but hopefully
nothing destructive.
Check out the SilverBullet docs on how to install it. Note that it’s different on v0.10.4 than on v2.
Caveats
this will only work if your space is in a git repo and only with the files you have versioned.
the history won’t work if you’re offline, I haven’t tested nor investigated much that use case.
I haven’t yet tested how this behaves with page renames. I don’t think it’ll show a good history on that use case.
The history shows a linear history, but git history can be like a tree, this UI is pretty simple and if you do a lot with git you may not get the best picture of the history.
Commits can have different authors but I’m not showing that information. I imagine most people edit their notes by themselves so showing the author information would be redundant.
I use git regularly with code, so I definitely see the appeal of seeing the diff.
I think that showing some kind of diff would take the plug to a next level, but I would need to think about how the UI for diffs would look like for it to be intuitive for everyday users.
The diff would need to be text only since mixing diff with a proper page render may not be feasible.
The goal for the versions UI is for users to be able to recover old changes.
What would you expect to get from a diff?
I think that I’d like to just click through versions and see what that version changed from the previous and see how the file “evolved” over time, but kind of do that with the current UI already.
Other users may need to find the date or context for certain change and that would be better served by a git blame.
I’ll give it some time and see what people that use this for a while feel that is missing before making any substantial changes.
I’ve put together a widget that lists all conflicted pages (if any), with simple links to view the diffs. When you navigate to a specific diff page, it shows the diff itself along with buttons to either delete the conflicted page or apply the diff (which replaces the original page).
I’m happy to share it if anyone is interested. Just a heads-up: since it deletes pages and can overwrite the original when applying a diff, there’s some potential risk involved if something’s not working as intended.
That said, it seems to be working quite well for me so far - haven’t run into any issues yet.