Using Discourse as a community-powered wiki

The following is a guest post by Sam Nazarko, CEO and founder of OSMC.tv

Are you using Discourse in a novel way? If you're interested in writing a guest post like this one, please get in touch.

In 2014, I started working on a new project, OSMC (Open Source Media Center). OSMC is a free and open source media player based on Linux that lets you play back media from your local network, attached storage and the Internet.

osmc-frontpage

As the project started to accumulate users, we wanted to help the newcomers as much as possible and ensure that they could get the resources they wanted. The need for a Wiki became abundantly clear but I wasn’t sure that popular Wiki software was the best fit for us. For a while we worked on our own GitHub based Wiki system. GitHub had a markdown editor, but it still left a lot to work out for newcomers and the process wasn’t as smooth as we had expected.

After some thought, we realised that Discourse had everything we wanted. Users familiar with posting and the WYSIWYG editor would be able to edit or add to the Wiki without any additional learning curve, and they wouldn’t need to hold an additional account on an external Wiki site. Mark Theis (OSMC’s web developer) and I got to work. By the end of the day, we had a Wiki category in Discourse and some basic scripts that scraped this forum category every half hour and published the pages on our website as static HTML. We scrape Discourse via the Discourse REST API and build templates for our blog.

omsc-wiki

It’s working well. Edits are easily trackable, and Discourse’s permission system ensures we have fine control over edits on the website. The new implementation is also very fast, as we build the Wiki pages as static HTML and cache them. Discourse has already proven its ability to handle large numbers of posts, so unlike other Wiki software, I’m not concerned about performance problems as the Wiki scales.

There is certainly room for improvement with our Wiki. We scrape each post from the Wiki category and get the post content as JSON. This JSON contains pre-formatted HTML. In the future, it would be good to be able to access the post as Markdown and have more control over the styling of the content. Editing posts is simple enough, but adding new categories or new articles is still a little too complex for some users, and this is something we’d like to simplify in the future.

The Wiki needs a lot of work, but we're glad to have implemented something stable and easy to use that will last for many years to come. We are now looking at using Discourse to power our new Newsletter system for the same ease of editing and great durability.

You can get the source code here: (updated)

https://github.com/osmc/website/tree/master/server/modules/wiki