Spud CMS ======== Spud CMS is a CMS Engine designed to be robust, easy to use, and light weight. Installation/Usage ------------------ 1. In your Gemfile add the following gem 'tb_cms' 2. Run bundle install 3. Copy in database migrations to your new rails project bundle exec rake railties:install:migrations rake db:migrate 4. Change ApplicationController to inherit from Spud::ApplicationController instead of ActionController::Base class ApplicationController < Spud::ApplicationController 5. run a rails server instance and point your browser to /spud/admin Routing to the CMS Engine -------------------------- Routing your home page to the CMS engine is fairly straight forward. in your applications application.rb file add a configure block as such Spud::Cms.configure do |config| config.menus_enabled = true config.root_page_name = "home" end Where "home" is the page name you wish to use. Pages will default render to the 'application' layout of your application. You can change this by using templates to specify base layouts. Defining Templates / Layouts ---------------------------- Spud CMS has recently changed its template structure. The admin templates area is no longer with us. In Spud CMS templates are defined similar to how an asset pipeline manifest is defined. At the top of your layout files a series of comments can be used to define the name of the template, and the content_for blocks that are editable by the user. Example: <% #template_name: 2 Column Page #html: Left #html: Right %> Optionally a description can be passed as well as a `site_name: default` for multisite mode. Using Liquid Template Engine ---------------------------- Spud CMS utilizes the liquid template syntax engine created by Shopify. This allows you to easily inject variables into your pages in the page editor. Example: