This add-on is operated by Shogun Labs
Powerful CMS for all your needs
Last updated 13 October 2015
The Shogun add-on is currently in beta.
Table of Contents
Shogun is an easy to use and powerful CMS. Shogun lets you create, edit, and maintain all your content from one location. Anyone can use it to build sophisticated pages without writing any code.
In addition to our CMS, we offer more codeless add-on features. Toggle a switch and you can add analytics, A/B testing, support chat, and even localization.
Shogun is accessible via an API and has supported client libraries for Ruby on Rails.
Provisioning the add-on
Shogun can be attached to a Heroku application via the CLI:
A list of all plans available can be found here.
$ heroku addons:create shogun -----> Adding shogun to sharp-mountain-4005... done, v18 (free)
Once Shogun has been added,
SHOGUN_SECRET_TOKEN variables will be available in the app configuration. These are used to load the correct routes, show previews, and authenticate the editor. This can be confirmed using the
heroku config:get command.
$ heroku config:get SHOGUN_SITE_ID $ heroku config:get SHOGUN_SECRET_TOKEN
After installing the Shogun add-on, you need to install the appropriate library for your stack. You are now fully configured and ready to start creating pages.
After provisioning the add-on it’s necessary to locally replicate the config vars so your development environment can operate against the service.
Use the Heroku Local command-line tool to configure, run and manage process types specified in your app’s Procfile. Heroku Local reads configuration variables from a
.env file. To view all of your app’s config vars, type
heroku config. Use the following command to add the
SHOGUN_SECRET_TOKEN values retrieved from heroku config to your
$ heroku config:get SHOGUN_SITE_ID -s >> .env $ heroku config:get SHOGUN_SECRET_TOKEN -s >> .env
Credentials and other sensitive configuration values should not be committed to source-control. In Git exclude the
.env file with:
echo .env >> .gitignore.
For more information, see the Heroku Local article.
Using with Rails 3.x
Ruby on Rails applications will need to add the following entry into their
Gemfile specifying the Shogun client library.
gem 'shogun', github: 'getshogun/shogun_rails'
Update application dependencies with bundler.
$ bundle install
If you are using Unicorn, you also need to add this line in your
after_fork configuration block:
# config/unicorn.rb after_fork do ... Shogun.daemon.call ... end
Shogun will use your
application layout by default. You can override this with the name of another layout:
# config/initializers/shogun.rb Shogun.layout = "custom_layout"
Shogun will automatically mount itself in your
routes. You can disable this functionality and manually mount Shogun by creating an initializer:
# config/initializers/shogun.rb Shogun.automount = false
You will then need to mount Shogun manually in your
# config/routes.rb mount Shogun::Engine => '/'
For more information on the features available within the Shogun dashboard please see the docs at getshogun.com/docs.
The Shogun dashboard allows you to see all your Shogun sites.
The dashboard can be accessed via the CLI:
$ heroku addons:open shogun Opening shogun for sharp-mountain-4005
or by visiting the Heroku Dashboard and selecting the application in question. Select Shogun from the Add-ons menu.
Removing the add-on
Shogun can be removed via the CLI.
This will destroy all associated data and cannot be undone!
$ heroku addons:destroy shogun -----> Removing shogun from sharp-mountain-4005... done, v20 (free)