4
votes

I'd like to add a CMS and blog to a web app. One that won't get in the way. There's not a lot of content, but enough that we want non-devs to be able to revise pages and probably add and remove them too.

We have a substantial app that can't be touched by the CMS, not a site that we're migrating.

How have you dealt with this situation?

Would you advise:

  • Running two apps (a content app and the 'app' app)
  • Plugging in a light weight CMS
  • Rolling our own using gems/plugins for WYSIWYG

Details

We'll be adding a bug ticketing and support system later too. Probably built into the app.

We'd like the users of the app to be able to comment on pages and blog posts, file tickets, etc. all from their main account, so it seems to make sense to build it into our app, rather than as an extra app. Love to hear war stories on this.

Should be:

  • Unobtrusive (Shouldn't interfere with the existing app)
  • Must not mess with Devise, DeclarativeAuthorization, or Omniauth. We've got extensive user accounts, permissions, authentication mechanisms and groups setup. These must stay.
  • Lightweight (prefer something dev friendly than feature loaded)

Desired Features:

  • Basic WYSIWYG for content editors
  • Lets us handle accounts (with Devise)
  • and maybe even permissions (with DeclarativeAuthorization)

I've read this similar question, but the author seems willing to have something a bit more intrusive. Simple Rails 3 CMS Gem/Plugin?

Options Found

Refinery seems to have a lot of features, but at a cursory look it needs a lot of control over what's going on: http://refinerycms.com/guides/attaching-refinery-cms-to-an-existing-rails-application It says it's modular, but it seems like there's a big chunk of non optional stuff in there.

Radiant seems a bit monolithic as well http://groups.google.com/group/radiantcms/browse_thread/thread/b691cf9ab644a8b2

ComfortableMexicanSofa seems a bit closer to what I want: https://github.com/twg/comfortable-mexican-sofa

Adva-Cms has the right philosophy but appears to be dead. Adva-Cms2 isn't ready http://adva-cms.org/

Governor seems good, but maybe a bit too young and lean https://github.com/carpeliam/governor

Conclusion

So far rolling our own, or using ComfortableMexicanSofa seems like the bet, but I'd like your thoughts before I spend a few days messing around with it.

2

2 Answers

5
votes

I am now rolling my own blog app and I am kind of newbie to Rails 3. Even like that, in 1 week i have a blog with tags, comments, authentication with omniauth, etc.. my advise is: roll your own. I was having the same doubt and looking for pre-made solutions and I decided to start it from zero and just look for plugins for anything i need.

It goes pretty fast if you know already some rails programming and you use the right plugins. This is what i used:

  • Omniauth to let users be able to autenticate with facebook, twitter etc.. and leave you comments.

  • rails_admin: it allows you to manage your blog by going to yourapp.com/admin. It uses devise to create an Admin user (you can specify a diferent model name than user to not to mix it with the users from omniauth or from your other app) and if you have the right models and associations between them you can from there create your posts, assign them tags or categories and also delete comments etc.. its all done in an easy way. For the Text Area that you use to introduce the content of your posts you can associate it with the ckeditor just by adding to the rails_admin initializer something like:

    config.model Post do
      edit do
        field :body, :text do
          ckeditor true
        end
      end
    end
    

    And with the ckeditor you can introduce pictures, attach videos, format text, and so on.

  • Use kaminari for pagination, or you can use will_paginate if you are more used to that.

  • Using the blueprint framework for styling with css you will save time and have a more standar styling.

  • Use few jquery lines to insert/delete comments graciously.

And that's all I can remember now. And if it shouldn't interfere with the main app, i would just assign a subdomain for it. So if you go to blog.myapp.com you access to the blog and if you go to myapp.com you access to the app. And you want users from the app to interact with the blog so you should use just one app and have this 2 subdomains pointing at differents parts of the same a app.. take a look at: rails 3 - one app, multiple domains, how implement a different 'root' route for one of the domains?

That's all i can think now! let me know if i can help you in anything else.

1
votes

rails_admin: it allows you to manage your blog by going to yourapp.com/admin. It uses devise to create an Admin user (you can specify a diferent model name than user to not to mix it with the users from omniauth or from your other app) and if you have the right models and associations between them you can from there create your posts, assign them tags or categories and also delete comments etc.. its all done in an easy way. For the Text Area that you use to introduce the content of your posts you can associate it with the ckeditor just by adding to the rails_admin initializer something like:

config.model Post do
  edit do
    field :body, :text do
      ckeditor true
    end
  end
end