Open sbrl opened 8 years ago
This is rather complicated. I'm not sure whether I'll be able to do it - I'll have to take a look.
I hardly know what I'm talking about here, but, this sounds a lot like what git
already implements, granted not through the web UI but maybe setting up git integration #192 first and then looking at how WikiJS implements diffs
would be insightful?
I quite like how WikiJS manages conflicts because it's familiar (it's essentially a git diff
), so maybe have a look at how it's been implemented there.
That's an interesting idea @RyanGreenup. The problem is that Pepperminty Wiki already has a page revision system (that's tied into the page index), and I don't want to reply on git integration to allow for comparing revisions. Since I last commented on this issue though I've now implemented an extra data system, so it's just a case of finding a lightweight PHP library (1 file) to do the job (I'm really reluctant to spawn any subprocesses because of the performance hit).
The other thing is that I'm very keen on implementing this server side, such that users with Javascript disabled or without javascript support (e.g. elinks
) can still view the diffs.
Before, I wasn't able to use any libraries at all (the Parsedown parser was a special case). With the new system, I can include files in the main Pepperminty Wiki index.php
at build time, allowing for limited library inclusion.
Being able to compare revisions is an essential feature. This would be extremely useful for regulars of a wiki as they can quickly see what has changed.