Discourse For Websites

Over the last few weeks, I’ve been doing a bit of work with discourse. Here’s a couple of things I learned:

Discourse uses Docker pretty nicely

Installing discourse is really easy. They make it very much easy to use with the discourse_docker repository. I had discourse setup and ready to go quite quickly. And then I got stuck, for a few days.

Sometimes things are broken but fixed quickly

In the beginning, whatever I did, the static website embedding refused to work. I tried it with RSS feeds and without RSS feeds. Google searches lead me to meta.discourse.org and at that point I tried a few things which were unnecessary, which did not fix the actual problem. It turned out that at some point discourse had broken embedding. However, as soon as we figured out it was actually a discourse bug, the fix was pretty fast.

WP-Discourse could use some love

The discourse WordPress plugin does what it promises out of the box, but it needs a bit more work. For instance, it uses the file_get_contents function to open a URL. Some hosts block that function from opening a URL. I have a pull request to fix that, hopefully, it’ll be merged soon.

I could be wrong, but I couldn’t find a way to bulk publish to discourse. For a site newly converting to discourse, the option seems to be, switch new posts new to Discourse, the rest stays on WordPress.

Showing the old comments along with the new like How To Geek needs a bit of messing around with the theme.

Documentation could be better

I found some failures that were really hard to discover. For instance, the static site embedding works only if you’ve set a username in ‘embed by username’ – No idea why that happens, but there’s no documentation I could find for it. Then there’s help text like below.

EMBEDDING ONLY: Whether to embed a RSS/ATOM feed as posts.

Perhaps something better would be

EMBEDDING ONLY: Check to disable RSS/ATOM feed as posts.

I intend to open a pull request about this one.

The API documentation really needs to be better, sadly. The WordPress implementation uses an API endpoint, which doesn’t seem to be documented. I had to figure it out from the WP-Discourse code.

Error logging needs to be better

I wish error logs gave me information when the iframe refused to load. I had to pretty much try different things to figure it out. I wish I had a checkbox that would give me better logging information. The development mode doesn’t work out of the box with the docker existing setup, so I’m stuck.






Leave a Reply