DeluxePublisher
Deluxe Publisher Content Managament Sytem (CMS) Gem was created to easily allow the addition of a CMS to a Rails website so that clients can update their own content pages inlcluding simple blog pages. While an entire website could be created with only the Deluxe Publisher its designed to add CMS pages/features to sites that have other more complicated features.
Deluxe Publisher is a Rails 3 Engine and therefore requires Rails 3.
Alpha Alpha Alpha, this CMS is under heavy development and not ready for prime time. Use at your own risk.
Instilation
Gemfile
Crate a new rails project, change directory to that project, and don’t forget to delete your index.html file.
rails new MyDeluxeWebsite
cd MyDeluxeWebsite
rm public/index.html
Or change directory to your rails project.
Add these to your Gem file
gem "deluxe_publisher", :git => "git://github.com/PaulRaye/Deluxe-Publisher.git"
gem "acts-as-taggable-on", "~> 2.0.6"
gem "nested_set", "~> 1.6.4"
gem "ckeditor", "3.5.2"
gem "paperclip", "~> 2.3.8"
gem "aws-s3"
and
bundle install
CKEditor
Deluxe Publisher uses CKEditor as it WYSIWYG edtor for content areas.
rails g ckeditor:base
rails g ckeditor:migration
rake db:migrate
See github.com/galetahub/rails-ckeditor for details
Set up S3
If you are using S3 for your uploaded images and files set up your S3.yml file and update your Picture and AttachmentFile Models See github.com/galetahub/rails-ckeditor for details
Acts as Taggable On
Deluxe Publisher uses Acts as Taggable On for tags in the blog pages, must be installed even if you are not useing blog pages.
rails g acts_as_taggable_on:migration
rake db:migrate
See github.com/mbleigh/acts-as-taggable-on for details.
Deluxe Publisher
Now to Deluxe Publisher, we need to generate some javascript, CSS and images for the Content Management System as well as example files you can use as a starting point for designing your site.
rails g deluxe_publisher:base
Generate the migration for the Deluxe Publisher Tables and migrate.
rails g deluxe_publisher:migration
rake db:migrate
Load Sample Site
Now lets load in a sample site so we’re not starting with a black page.
rails g deluxe_publisher:sample_site
Routes
If you are not using any other engines with your rails application then Deluxe Publisher will use its default routes including the wild card route that captures all routes not specified otherwise. You can add routes to your routes.rb file that will take presidence over the Deluxe Publisher Routes. However if you are using other Rails Engines that also have dedault routes you may need to move those engines routes into your /config/routes.rb file to ensure they are called before Deluxe Publishers wildcard route.
Authentication
Deluxe Publisher designed to use your sites authentication, not force one on you.
Authentication is set up by selecting the authentication method for both the public facing pages and the Administration tools. There are three authentication options:
-
:none indicating no authentication
-
:basic uses Rails authenticate_or_request_with_http_basic along with login and password you provide
-
:method calls back to an authentication method you provide
The Authentication setting are set in the config/initializers/deluxe_publisher.rb file
# authentication procedure for public facing pages
#use :none, :basic, :method
config. = :none
#for :basic authorization procedure
config.publisher_username = "Bob"
config.publisher_password = "isyouruncle"
#for :method authorization procedure
config. = :your_authorization_method
#Authentication procedure for deluxe publisher admin pages
#use :none, :basic, :method
config. = :basic
#for :basic authorization procedure
config.admin_username = "admin" ########## Please Please Please ##########
config.admin_password = "nimda" ########## Change username and password ##########
#for :method authorization procedure ########## Or better yet use ##########
config. = :authenticate_admin! ########## an Authorization method ##########
Note that the default authentication for public is :none and the default authentication for publisher is :basic with username and password of admin/nimda. These are intended to be bad so you’re forced to change them.
Its Installed!, now what?
Profit!
Detailed Instructions to come but you can create page types here:
yourapp.com/deluxe_publisher/page_types
And you can create pages here: