shadowproject / shadow

ShadowCore integration/staging tree
MIT License
95 stars 60 forks source link

Decentralized wiki #83

Open xaur opened 7 years ago

xaur commented 7 years ago

The newly announced wiki is a very important piece of infrastructure.

I believe it must be decentralized. What if my government decides to ban www.umbra.academy tomorrow? What if an advisory gets a hold of website content? Or I'll just become offline for a week.

Important information must be published in a way that is trivial to replicate.

I suggest GitHub Wiki as a starting point. It is essentially Git + Markdown. Second option is GitHub Wiki using MediaWiki markup. This could enable automated mirroring to your MediaWiki instance.

Joanna Ruktowska highlighted the benefits of using Git-based blog (but the principles apply to wiki as well):

  1. Independence on the underlying hosting company
  2. Flexibility of distribution
  3. Integrity protection
  4. Easily accessible edits history

Of course the current wiki can be crawled with wget, but HTTP crawling is so much inferior to Git.

AllienWorks commented 7 years ago

Hi @xaur, thanks much for your input.

I agree with you regarding the decentralization and censorship-proof nature of our wiki. In fact, majority of the content there was already git-hosted via our main website. So why did we abandon this and went with MediaWiki?

The answer is: ease of contribution by the community members. While git is amazing, we (well, I) wanted to launch something, where anyone could contribute no matter if they know git or not. For us, even slightly dev-oriented people it's a piece of cake, but the ordinary person would have a hard time with git.

Truth be told, I've ran with a few issues with the MediaWiki site as well, so I'm actively considering alternatives. Your feedback is highly appreciated and provides some good points to consider; I'll keep this in mind.

I don't feel like GitHub wiki is a way to go though. But if you know about some git-based translation-ready wiki with (optional) markdown support, bring it on.

Cheers!

xaur commented 7 years ago

Ease of contribution was my guess why you went with MediaWiki :)

The challenge is how to add decentralization.

An interesting case I encountered is bitcoinfactswiki. The setup is explained in the blog post. Briefly: it is Markdown-based, runs on ikiwiki and stored in Git. Articles are stored in per-language repositories (e.g. english).

Another direction is to hack around MediaWiki to add decentralization or at least a sane export. Simplest options first:

  1. Periodic dumps of pages.

    All "content pages" are dumped as .mediawiki files, zipped, and hosted. Per-language bundles can be made. No history preserved, no integrity protection, no incremental updates, but simple to implement.

  2. One-way mirroring MediaWiki => Git repo

    Any time page edit is made, commit the new .mediawiki file to a Git repo. This repo can be cloned and fetched by mirrors. We have history and incremental updates (can quickly sync mirrors).

  3. Bi-directional mirroring MediaWiki <=> Git repo

    It would be great to both edit in browser and push via Git. But I imagine issues with conflicts and merging. Haven't studied this. Maybe someone made it possible already.

As for GitHub, is your concern the lack of translations?

A note on security. "let anyone easily contribute" is dangerous. Simple case are spammers. Advanced case is an adversary introducing subtle changes to the guides to disinformate users or to degrade security. The moderation of changes is required anyway. Open wiki may work, this is just my concern.

A philosophical note. Simplifying access for people who cannot use Git complicates access for people who can. If I cannot edit the page in my favorite text editor and "push" it to MediaWiki, I'm forced to use browser, javascript, and online editor. A more sad example is a corporate environment of Confluence-lovers. Its editor is sluggish. Non-techies are happy with it. But as a "techie" I hated it and avoided it.

kewde commented 7 years ago

@allien

I'm not sure how the MediaWiki works, I suppose it isn't a simple file based wiki? It might be possible to host the source code of the wiki and the content, allowing replication and even bi-directional editing?

Currently the user contributions are being watched. I think once we're done accumulating all the information it will be rather easy transporting it to a more git-friendly manner. There is a documentation repo on GitHub but not a single user has contributed except for Allien and me.

As for decentralization, maybe we can export it to static html pages and host it on something like ipfs and/or zeronet.

I agree that JavaScript should not be a requirement to contribute.

kewde commented 7 years ago

https://github.com/aaronpk/Local-MediaWiki-Sync

^That should allow for offline editing of the wiki.

AllienWorks commented 7 years ago

I've done some research myself and found these:

Dokuwiki approach should be the most easy to set up (and therefore replicate elsewhere), IMHO it's the way to go. I want to do a test wiki first to see if everything's running, than we can migrate.

Any feedback?

kewde commented 7 years ago

I'd like to give Dokuwiki a shot, seems like a clean solution to the problem at hand.

xaur commented 7 years ago

http://realms.io/ doesn't even render content with javascript turned off.

Gollum looks much better. It was released by GitHub itself, and powered GitHub Wiki. In 2014 Gollum project removed reference to GitHub because GitHub was not keeping up with Gollum updates.

Anyway, since I can browse GitHub Wikis without javascript I assume it works for Gollum too. Side-by-side editor and preview is a great feature that could worth javascript for some people. Other nice features are out of the box Markdown support and ability to push via both web UI and Git CLI. Possible difficulties are deployment and running, as it uses Ruby with quite some dependencies.

Dokuwiki comes with its own syntax, but Markdown plugin is available. My personal dislikes are a bit ugly styling and it is written in PHP (worse than Ruby imho). But it could be easier to operate than Gollum... Hard to tell.

I'd vote for Markdown syntax if its possible to achieve.

AllienWorks commented 7 years ago

I'm already playing with DokuWiki, so far it looks great – mainly regarding translations (checking of modified pages, notices of outdated pages for users, showing diffs etc.).

Markdown is a must, after our current MediaWiki I can't stand those "weird" syntaxes.

kewde commented 7 years ago

DokuWiki: The styling should not be a worry, they offer a nice template system. There are quite a few templates available that look a thousand times better than the default one!

I agree that markdown is a must.