# Sam's Blog Plugin

**URL:** https://meta.discourse.org/t/sams-blog-plugin/12656
**Category:** Plugin
**Created:** [12 Febbraio 2014, 5:01am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656 "2014-02-12T05:01:20Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [12 Febbraio 2014, 5:01am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/1 "2014-02-12T05:01:20Z")

</div>

Location: [GitHub - SamSaffron/blog: samsaffron.com blog plugin for Discourse · GitHub](https://github.com/samsaffron/blog)

Author: @sam

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

 ![](https://global.discourse-cdn.com/meta/original/2X/f/f2c4932df5652f45ad21a7391e61b330c3fc3ec3.png) 

See also: [http://samsaffron.com](http://samsaffron.com)

---

<div class="post-metadata">

### Author: ![xrvk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xrvk/32/2578_2.png) [@xrvk](https://meta.discourse.org/u/xrvk)
#### Post date: [17 Febbraio 2014, 3:05am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/2 "2014-02-17T03:05:51Z")

</div>

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 [discourse.org](http://discourse.org) 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.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [17 Febbraio 2014, 3:09am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/3 "2014-02-17T03:09:18Z")

</div>

> [@xrvk](#):
>
> recurrence

Ooops I forgot to push my latest fix ☹ 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 [http://eviltrout.com/2014/01/22/embedding-discourse.html](http://eviltrout.com/2014/01/22/embedding-discourse.html) and our blog is WordPress. Discourse is rainbows all the way down, more than one way to do everything.

---

<div class="post-metadata">

### Author: ![cregox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cregox/32/115904_2.png) [@cregox](https://meta.discourse.org/u/cregox)
#### Post date: [2 Marzo 2015, 12:30pm UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/4 "2015-03-02T12:30:08Z")

</div>

> [@sam](#):
>
> WordPress integration is strategic for us, we want to make sure it keeps working, to do so we need to dogfood.

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 [http://samsaffron.com/](http://samsaffron.com/) - says ERR\_NAME\_NOT\_RESOLVED and [it looks down for everyone](http://www.downforeveryoneorjustme.com/samsaffron.com)! 😮

> [@sam](#):
>
> Discourse is rainbows all the way down, more than one way to do everything.

What does this even means?! 😕

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! 😛

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [2 Marzo 2015, 6:14pm UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/5 "2015-03-02T18:14:28Z")

</div>

> [@cawas](#):
>
> What does this even means?!

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. 😉 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.

---

<div class="post-metadata">

### Author: ![ajoy39](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ajoy39/32/39861_2.png) [@ajoy39](https://meta.discourse.org/u/ajoy39)
#### Post date: [18 Marzo 2015, 1:07am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/6 "2015-03-18T01:07:10Z")

</div>

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

 ![](https://global.discourse-cdn.com/meta/original/3X/9/5/95313e22e251462597ecb79ac2ae311c6ce61a97.png) 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 😉

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [18 Marzo 2015, 5:41am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/7 "2015-03-18T05:41:13Z")

</div>

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [19 Marzo 2015, 8:18am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/8 "2015-03-19T08:18:28Z")

</div>

Two Sams.. well that could make for interesting possibilities.. some fascinating arguments.. 😉

---

<div class="post-metadata">

### Author: ![Mike\_Mayer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mike_mayer/32/116651_2.png) [@Mike\_Mayer](https://meta.discourse.org/u/Mike_Mayer)
#### Post date: [19 Settembre 2015, 6:16am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/9 "2015-09-19T06:16:11Z")

</div>

@sam,

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 [http://lvh.me/](http://lvh.me/), per the advice here: [http://manuel.manuelles.nl/blog/2015/05/19/rails-subdomains-for-localhost-development/](http://manuel.manuelles.nl/blog/2015/05/19/rails-subdomains-for-localhost-development/)

and thus adjusted the line in your plugin like this:

::BLOG\_HOST = Rails.env.development? ? “[blog.lvh.me](http://blog.lvh.me)” : “[blog.xxxx.com](http://blog.xxxx.com)”  
::BLOG\_DISCOURSE = Rails.env.development? ? “[intercourse.lvh.me](http://intercourse.lvh.me)” : “[intercourse.xxxxx.com](http://intercourse.xxxxx.com)”

but no dice.

thanks for sharing this plugin. it is quite helpful.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [21 Settembre 2015, 6:04am UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/10 "2015-09-21T06:04:29Z")

</div>

definitely lots of dice here 🙂 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:

```plaintext
BLOG=1 bin/thin start

```

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

---

<div class="post-metadata">

### Author: ![cregox](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cregox/32/115904_2.png) [@cregox](https://meta.discourse.org/u/cregox)
#### Post date: [24 Settembre 2015, 3:57pm UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/11 "2015-09-24T15:57:28Z")

</div>

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

[https://meta.discourse.org/t/curated-home-plugin/23474?u=cawas](https://meta.discourse.org/t/curated-home-plugin/23474)

---

<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: [24 Settembre 2015, 6:39pm UTC](https://meta.discourse.org/t/sams-blog-plugin/12656/12 "2015-09-24T18:39:17Z")

</div>

That plugin has not been working for a very long time now. I [updated the topic](https://meta.discourse.org/t/curated-home-plugin/23474/37) accordingly.
