# Using Discourse as a community-powered wiki

**URL:** https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599
**Category:** Blog
**Created:** [May 3, 2016, 10:37am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599 "2016-05-03T10:37:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [May 3, 2016, 10:37am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/1 "2016-05-03T10:37:25Z")

</div>

The following is a guest post by Sam Nazarko, CEO and founder of [OSMC.tv](http://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…

* * *

This topic is for comments on the original blog entry at: [Using Discourse as a community-powered wiki](http://blog.discourse.org/2016/05/using-discourse-as-a-community-powered-wiki/)

---

<div class="post-metadata">

### Author: ![runofthemill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/runofthemill/32/56919_2.png) [@runofthemill](https://meta.discourse.org/u/runofthemill)
#### Post date: [May 26, 2016, 12:05am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/2 "2016-05-26T00:05:11Z")

</div>

this is pretty awesome! I might try this out on a new project, but just a heads up, the github links are dead. looks like the repo was refactored, so now the links are here:

`wiki.js`

> <https://github.com/osmc/website/blob/master/src/assets/js/modules/wiki.js>

`wiki.php` - now a module

> **[website/server/modules/wiki at master · osmc/website](https://github.com/osmc/website/tree/master/server/modules/wiki)**
>
> master/server/modules/wiki

is it possible to get Sam (or someone from OSMC) to put together a little how-to on using their Wiki code?

---

<div class="post-metadata">

### Author: ![marktheis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marktheis/32/38285_2.png) [@marktheis](https://meta.discourse.org/u/marktheis)
#### Post date: [May 26, 2016, 6:39am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/3 "2016-05-26T06:39:22Z")

</div>

Hi. Yeah I’ve been refactoring a bit 🙂.

All the server side code is now here:

> **[website/server/modules/wiki at master · osmc/website](https://github.com/osmc/website/tree/master/server/modules/wiki)**
>
> master/server/modules/wiki

Wiki.js is just a very basic search feature you can see live on [Wiki - OSMC](https://osmc.tv/wiki) (at this point all the wiki data is being served server-side).

It’s a bit of a convoluted/hack’ish setup, so it’s probably a bit tricky to follow without knowing the flow. I’ll make a guide soon 🙂

---

<div class="post-metadata">

### Author: ![runofthemill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/runofthemill/32/56919_2.png) [@runofthemill](https://meta.discourse.org/u/runofthemill)
#### Post date: [May 26, 2016, 6:43pm UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/4 "2016-05-26T18:43:56Z")

</div>

awesome - thanks @marktheis! as an aside - is the site css based off a framework, or completely custom? I noticed you guys use express/ghost/normalize.css - wasn’t sure if the rest was built from scratch or used something a la Susy or Bourbon as a starting point. either way, I love the design!

---

<div class="post-metadata">

### Author: ![marktheis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marktheis/32/38285_2.png) [@marktheis](https://meta.discourse.org/u/marktheis)
#### Post date: [May 26, 2016, 7:28pm UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/5 "2016-05-26T19:28:51Z")

</div>

css is completely custom. Frameworks are nice, but I always end up fighting the framework. And they’re usually too big for my taste.

Yes apart from express, ghost, and a few js/css modules everything (server/client) is built from scratch.

With a website that depends on a lot of external services (discourse for wiki and comments, woocommerce for shop, another server for diskimages) I think that node with express and handlebars templates works really well.

Btw. I’m also currently building an email system that takes posts from discourse, and turns them into ready and processed emails via [Foundation for Emails](http://foundation.zurb.com/emails.html). To be consumed by phplist. Yes I really don’t like phplist’s html editor 😄

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [July 7, 2016, 2:39am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/6 "2016-07-07T02:39:59Z")

</div>

Do these custom scripts handle interlinking, categorization and tagging in any way?

---

<div class="post-metadata">

### Author: ![marktheis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marktheis/32/38285_2.png) [@marktheis](https://meta.discourse.org/u/marktheis)
#### Post date: [July 7, 2016, 7:08am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/7 "2016-07-07T07:08:25Z")

</div>

Interlinking: if you mean canonical urls then no. We find that google prioritises [Wiki - OSMC](http://osmc.tv/wiki) over discourse for us, so I haven’t made any changes there. (It’s not that important for us atm).

categorization: Yes each wiki post is in a category our [discourse](https://discourse.osmc.tv/c/wiki) and [site](https://osmc.tv/wiki/).

Tagging: No. We don’t use the tag plugin.

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [July 7, 2016, 8:24am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/8 "2016-07-07T08:24:03Z")

</div>

Thanks for the info.

> [@marktheis](#):
>
> Interlinking: if you mean canonical urls then no.

I mean, if one topic links to another, will the links in the corresponding wiki post direct to the target wiki post?

---

<div class="post-metadata">

### Author: ![marktheis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marktheis/32/38285_2.png) [@marktheis](https://meta.discourse.org/u/marktheis)
#### Post date: [July 7, 2016, 11:03am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/9 "2016-07-07T11:03:41Z")

</div>

Not it won’t. We insert links to the target wiki post manually.

---

<div class="post-metadata">

### Author: ![runofthemill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/runofthemill/32/56919_2.png) [@runofthemill](https://meta.discourse.org/u/runofthemill)
#### Post date: [July 29, 2016, 8:57pm UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/10 "2016-07-29T20:57:06Z")

</div>

Any progress on the wiki guide? I’m not using Express, but I’m hoping that I can use Sage’s routing features with just a little bit of hacking.

---

<div class="post-metadata">

### Author: ![marktheis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marktheis/32/38285_2.png) [@marktheis](https://meta.discourse.org/u/marktheis)
#### Post date: [August 5, 2016, 1:04am UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/11 "2016-08-05T01:04:51Z")

</div>

Been a bit busy lately, here’s the short version.

The gist of it is to arrange it properly in discourse.  
We have a main table of contents (toc) post with links to each category toc that then have all the posts listed for that category.

So for us it’s:

Main toc post with links to all the category posts:

````plaintext
> general
> vero
> pi
```
And then in the general post e.q.

```
> FAQ
> how to
> get started
```

So via the discourse api you get the main toc. loop the category links, then you loop the post links and get the title and body.

We then write the whole thing to a single json file for easy use.

So when you go to https://osmc.tv/wiki/general/frequently-asked-questions/

It looks if "general" exists in the json file, and then after that it looks up the title of the post. If that also exists it renders the page with that content.

Hope that helps :)
````

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [August 8, 2016, 6:22pm UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/12 "2016-08-08T18:22:31Z")

</div>

Btw, an offtopic thought: I suppose it is possible to make a simple one-page JS application that would use Discourse API only, some React / Angular client-side and some configuration file server-side to make a fully-functional wiki site that would fetch all the data from Discourse automatically.

However, I think, such a feature will eventually become just part of Discourse with custom templating per category and custom front page.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [August 8, 2016, 11:02pm UTC](https://meta.discourse.org/t/using-discourse-as-a-community-powered-wiki/43599/13 "2016-08-08T23:02:54Z")

</div>

> [@meglio](#):
>
> Btw, an offtopic thought: I suppose it is possible to make a simple one-page JS application that would use Discourse API only

Yep, this is something we might do, as discussed here:

> [@Single page application for docs using Discourse API](https://meta.discourse.org/t/single-page-application-for-docs-using-discourse-api/48380):
>
> Continuing discussion from [here](https://meta.discourse.org/t/want-my-forum-to-have-a-default-view-like-my-forum-search/40570). The v1 I had in mind for this was actually a lightweight single page application (i.e. [docs.discourse.org](http://docs.discourse.org)) interfacing with the Discourse API, which would open links in a new window ([meta.discourse.org](http://meta.discourse.org)). That way it’d be easier to style it to taste. But I suppose it might be roughly the same amount of work as a Discourse plugin. I haven’t had the chance to clean up my ideas yet, but here’s a mockup I was fiddling with: It has 3 components t…
