Wiki - File versioning

一曲冷凌霜 提交于 2019-12-03 16:36:23

I would just look at how ikiwiki or gitit are implemented (Perl and Haskell, respectively) as both are able to use Git as a backend.

As to ikiwiki (I'm using it for my intranet wiki at work) it saves page sources (wiki formatting) as plain files, and after each save (or git push from the outside) it "compiles" the site to a set of static pages. It uses make-style approach for compiling the site though so ony the changed pages are rebuilt.

Shahbaz

Speaking of Git, what you need is already implemented in the forms of git blame and git checkout.

Even though you could use those commands to get the job done, you would probably be better off with libgit2 which is basically all the functionality you need, but as a library instead of executables.

You may want to have a look at Gollum, Github's git-powered wiki engine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!