/spree-blogging-spree

Basic blog + news archive functionality for Spree E-Commerce app.

Primary LanguageRubyBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

SpreeBloggingSpree

Build Status

A basic blogging solution for use with the Spree E-Commerce platform.

The blog is found under /blog on the website font end. Blog entries have fields for title, body, summary, date published, and author. Each blog entry can also have categories and tags associated with it.

The Spree Editor extension can be used to provide a rich text experience when editing the body of a blog entry.

The author is an instance of Spree.user_class, typically a Spree::User. The author can be selected from users with the blogger role when editing a blog entry in the admin. Some additional fields, including nickname, website URL, and Google Plus URL are added to the user model. Google Authorship information is added to the page head when the Google Plus URL is set.

There is no commenting system yet. One option for adding comments is to override the spree/blog_entries/comments partial and include and external commenting system, such as Disqus.

Admin users can preview blog entries before they've made visible.

This fork differs significantly from the original, it started out as a newly generated extension for Spree 1.2 with the logic copied over and tests moved to RSpec.

Screenshot

This screenshot shows some example blog entries with the widgets in the left sidebar:

Screenshot

Installation

Add to your Gemfile:

gem 'spree_blogging_spree', :github => 'stefansenk/spree-blogging-spree'

Run:

$ bundle install
$ rake railties:install:migrations
$ rake db:migrate

Testing

Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.

$ bundle
$ bundle exec rake test_app
$ bundle exec rspec spec

TODO

Some additional features could include:

  • Allow searching for blog entries within the admin.
  • Allow searching for blog entries from the shop front end.
  • Get default per page from preferences.
  • Allow routes other than /blog.
  • Allow images to be uploaded and inserted. Currently, images (other than the featured image) must be uploaded via other means.
  • Add comments (including mechanisms for dealing with spam).
  • Add abilities for the 'blogger' role, so a blogger can only manage their own blog entries within the admin.
  • Add Twitter Cards meta tags.
  • Add Facebook Open Graph meta tags.

Copyright (c) 2013 Stefan Senk, released under the New BSD License