Sam's Blog Plugin

Location: GitHub - SamSaffron/blog: blog plugin for Discourse

Author: @sam

A Rails engine implemented as a Discourse plugin, provides a completely different front end to Discourse.

See also:


This is great! Both as a provider of blog functionality and as a comprehensive sample plugin to learn from. Are you planning to use this eventually on as well or sticking to WordPress?

When precompiling assets I got this error:

undefined method `recurrence' for Blog::UpdateStackOverflow:Class (NoMethodError)

I’m new to rails, but it seems related to sidekiq. Maybe I need to fix my installation somehow? Don’t need twitter or stackoverflow integration on my blog though, so removed the jobs for now and everything seems to work fine.

1 Like

Ooops I forgot to push my latest fix :frowning: pushed now.

We are still going to keep WordPress for our blog, WordPress integration is strategic for us, we want to make sure it keeps working, to do so we need to dogfood.

I use this mechanism, @eviltrout uses static embedding and our blog is WordPress. Discourse is rainbows all the way down, more than one way to do everything.


Does this means the plugin could actually replace wordpress? I’m already using discourse as a blog even without this, and I can see how a plugin could bring some benefits, but I’d prefer if it would “completely change the front end” of a category only. Or make it a subpage “/blog” and associate it with a category, to make it even better!

PS: Right now I can’t go to - says ERR_NAME_NOT_RESOLVED and it looks down for everyone! :open_mouth:

What does this even means?! :confused:

Although, with a few more tweaks, I could eventually even drop my squarespace as a main site in favor of discourse (even without a community) if that’s what you meant! :stuck_out_tongue:

Mostly it means that there’s no static documentation and you must sleuth through the codebase to figure out for yourself how to get things done. :wink: Luckily, there are way more rainbows than leprechauns, so it’s quite easy to maneuver through the existing code, derive samples from it and adapt them to suit your needs.

1 Like

Heh, I thought this was more of a generic “turn your discourse install in to a blog” plugin.

Turns out this particular plugin is pretty specific to Sam’s blog.

Guess I better get coding before someone comes to my site and starts asking questions about Stack Overflow :wink:


“Of the various possibilities I was expecting… … … …that was not one of them.”

1 Like

Two Sams… well that could make for interesting possibilities… some fascinating arguments… :wink:



this may be a boneheaded question, but what was your workflow for developing this plugin? do you run it in your local environment?

since the blog engine routes to a subdomain different from the discourse app, i’m unclear how to replicate this in a local environment. i tried using, per the advice here:

and thus adjusted the line in your plugin like this:

::BLOG_HOST = Rails.env.development? ? “” : “
::BLOG_DISCOURSE = Rails.env.development? ? “” : “

but no dice.

thanks for sharing this plugin. it is quite helpful.

definitely lots of dice here :slight_smile: key to getting this working is placing NGINX in front, works perfect for me. If you must you can alway launch it with ENV and then avoid this … eg:

BLOG=1 bin/thin start

And then amend internals to allow for a check against ENV['BLOG']

1 Like

This is probably nothing new for most folks there, but just wanted to point out to a very similar plugin:

That plugin has not been working for a very long time now. I updated the topic accordingly.