Git Product home page Git Product logo

comfy-blog's Introduction

ComfyBlog Build Status Dependency Status

ComfyBlog is an simple blog management engine for Rails 3.1 apps. It also integrates with ComfortableMexicanSofa CMS Engine

Installation

Add gem definition to your Gemfile:

gem 'comfy_blog'

Then from the Rails project's root run:

bundle install
rails g comfy:blog
rake db:migrate

Now you should be able to go to /admin/blog/posts and add new blog posts.

Configuration

First thing you want to do is change title and description of the blog. For that you need to adjust comfy_blog initializer.

config.title        = 'ComfyBlog'
config.description  = 'A Simple Blog'

You'll notice that you can access blog's admin area without any type of authentication. This is because ComfyBlog doesn't deal with users, it only knows how to save and show blog posts. You probably want to put blog's admin controllers behind your controller that handles authentication.

config.admin_controller = 'YourAdminBaseController'

If you want blog's controller paths to match your admin path, like cms-admin. Change the following configuration.

config.admin_route_prefix = 'cms-admin'

By default blog posts are served from the root. If you want to section off blog content to a /blog path. Adjust this configuration:

config.public_route_prefix = 'blog'

Provided views to display blog posts are pretty basic and you'll probably want to change them right away. You can change the layout from the default application to something else.

config.public_layout = 'blog'

Since ComfyBlog is an engine, it allows you to completely overwrite views. It's enough to create app/views/blog/posts/index.html.erb (could be HAML or whatever you want) and structure it in any way you want. There's also show.html.erb and _post.html.erb available.

Pagination is done using either WillPaginate or Kaminari. Add either in your Gemfile. You can control number of posts per page by adjusting this config:

config.posts_per_page = 10

Posted comments will be sitting in the queue waiting to be published. You can auto publish them by setting this to true:

config.auto_publish_comments = true

You can use Disqus to manage comments by setting the following config:

config.disqus_shortname = 'forum_shortname'

ComfyBlog is released under the MIT license

Copyright 2012 Oleg Khabarov, The Working Group Inc

comfy-blog's People

Contributors

jackneto avatar bgilham avatar bokor avatar

Watchers

James Cloos avatar Sol Tran avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.