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…
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:
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!
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. To be consumed by phplist. Yes I really don’t like phplist’s html editor
Interlinking: if you mean canonical urls then no. We find that google prioritises 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 and site.
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:
> 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 :)
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.