Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gem for Creating a full featured Blog in Rails Application [closed]

I need a gem for creating a Blog in my rails Application. We can write a whole bunch of our code, but for this small task an effective Gem is preferable. Please suggest a good Gem for creating a blog that supports following features :

- Adding static  Blog contents. 
- Feature to have image in blog
- Visitor/Viewer must be able to comment/share the blog 
 ( will be much nicer if can be commented/shared via Facebook account)

I got through Gems like :

-  "Redcloth" (for creating static web pages quickly; quite unsure 
    will it be able to handle image & comment facility. )
-  Gem "dynarex-blog" (for creating blog, but unable to find 
   good tutorial / proper documentation for integrating it with my Application).
like image 766
Ajay Avatar asked Jan 09 '14 09:01

Ajay


3 Answers

Assuming you already have an application ready, and would like to add a very minimal 'blog' to it as quickly as possible,

  • Make a simple posts model.

  • For adding static content, check out Active Admin.

  • You can keep the blog content as markdown, which you can process with redcarpet or bluecloth.

  • For image uploads, you can use Active Admin in conjugation with paperclip, and you can reference images in your markdown, or have a separate column for a 'flagship' image.

  • If you're hosting on Heroku and need storage for files, take a look at the dropbox driver for paperclip.

  • For facebook comments and sharing, you can just rely on their official vendor code. Don't forget to resolve any problems with turbolinks you might have, which comes included in your gemfile by default.

If you just want a drop-in, but comparatively heavy, solution, check out:

  • Jekyll

(Source: A clean minimal gem to add a simple blog to existing app? [closed])

like image 189
peteykun Avatar answered Oct 03 '22 02:10

peteykun


Here are some more resources you may benefit from:

Tutorials

  • How to build a blog in Rails 4
  • Rails Blog Tutorial
  • Simple Backend Area

Gems

  • CanCan (for admin athorization abilities)
  • Slugalicious (for slugged routes)
  • Redactor (for WYSIWYG)
  • Paperclip (for image upload)

Blog

If I were to create a simple blog app, I'd to this:

  1. Create Post, Category, Tag, Comment, Image models

  2. Use Slugalicious in the routes to route to the posts with routes like: domain.com/blog/your-post-title

  3. Add an admin area (probably with ActiveAdmin || RailsAdmin), but you may wish to create your own with this tutorial

  4. I'd use a WYSIWYG (such as Redactor) for creating the posts in the admin area. Looking at Petekun's post, I'd recommend going for the markdown format structure (keeps everything DRY)

  5. Use CanCan to determine which user roles can write comments etc

  6. Images can be uploaded with Paperclip or Carrierwave

like image 21
Richard Peck Avatar answered Oct 03 '22 04:10

Richard Peck


What you need is https://github.com/jipiboily/monologue. Its one gem that provides all your requirements. For override the sources just copy the content to your rails app folder. Thereby you can use your own style and logic.

like image 43
neonmate Avatar answered Oct 03 '22 02:10

neonmate