No description
  • Ruby 66.4%
  • HTML 26.7%
  • CoffeeScript 4.6%
  • SCSS 2.1%
  • JavaScript 0.2%
Find a file
Cedric Sohrauer d6d271b534 Merge pull request #40 from Scrivito/1-0-0
Update to 1.0.0
2015-12-09 18:17:30 +01:00
app remove unused side content on search page 2015-11-13 11:54:22 +01:00
bin initial commit 2014-09-12 14:06:24 +02:00
config Copied initializers from fresh rails 4.2.1 app. 2015-04-14 13:40:02 +02:00
db initial commit 2014-09-12 14:06:24 +02:00
lib fix typo 2015-04-14 11:50:26 +02:00
log initial commit 2014-09-12 14:06:24 +02:00
public initial commit 2014-09-12 14:06:24 +02:00
scrivito/migrate update text for andreas’ recommendations 2015-10-05 11:55:53 +02:00
spec upgrade scrivito to 0.66.0 2015-07-28 10:52:46 +02:00
vendor/assets initial commit 2014-09-12 14:06:24 +02:00
.gitignore initial configuration of the scrivito sdk 2014-09-12 15:10:03 +02:00
.rspec use rspec for tests 2014-09-15 09:37:00 +02:00
.travis.yml [travis] Speed up travis, by 2015-08-27 15:07:30 +02:00
config.ru initial commit 2014-09-12 14:06:24 +02:00
example_app_screenshot.jpg add a screenshot to the example app 2015-04-30 08:43:20 +02:00
Gemfile Update to 1.0.0 2015-12-09 15:35:08 +01:00
Gemfile.lock Update to 1.0.0 2015-12-09 15:35:08 +01:00
Rakefile initial commit 2014-09-12 14:06:24 +02:00
README.md update text for andreas’ recommendations 2015-10-05 11:55:53 +02:00

Scrivito Example App

Example App Screenshot

Basic setup

First of all you need to install the dependencies of the app with the following command:

bundle install

To configure the cms you need to create a new file named .env located in the root of your rails app and add the following content to it:

SCRIVITO_TENANT=<your-tenant-name>
SCRIVITO_API_KEY=<your-api-key>

The example app uses dotenv to load the ENV variables that Scrivito needs in development and test mode. If you want to start it in production or deploy it to heroku you have to take care of setting the ENV variables yourself.

You can just copy these settings from your dashboard at scrivito.com/dashboard.

The app expects a specific content structure in the CMS. This structure is created using migrations, similar to the ActiveRecord migrations that create database tables. You can execute the migrations using this command:

bundle exec rake scrivito:migrate scrivito:migrate:publish

Please note that the migrations require the tenant to be empty. If your tenant already contains data but is disposable, you can delete it and create another one from scratch using the dashboard at scrivito.com. The new tenant comes with new credentials, so you will need to update the configuration file.

Example Content

The migrations also generate some example pages so the app is not empty when you first start it. If you want to start with a blank CMS and do your own thing just delete the migration-file:

scrivito/migrate/20141127102237_generate_seed_content_migration.rb

The example text content was taken from the wikipedia articles: Berlin and History of Berlin.

Additionally, the following pictures were used:

  • lib/seed_data/brandenburg_gate.jpg "Brandenburg Gate panorama at night" by Runner1928 - Own work. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons

  • lib/seed_data/siegessaeule.jpg "Siegessaeule Aussicht 10-13 img4 Tiergarten" by A.Savin - Own work. Licensed under Creative Commons Attribution-Share Alike 3.0-2.5-2.0-1.0 via Wikimedia Commons

  • lib/seed_data/old_map.jpg "ZLB-Berliner Ansichten-Januar" by J. M. F. Schmidt - Scanned by the Zentral- und Landesbibliothek Berlin (ZLB). Licensed under Public domain via Wikimedia Commons

  • lib/seed_data/berlin_wall.jpg "Berlin Wall 1961-11-20" by National Archives - http://web.archive.org/web/20050206035542/http://nsarchive.chadwyck.com/bcphotox.htm. Licensed under Public domain via Wikimedia Commons

  • lib/seed_data/reunification.jpg "Thefalloftheberlinwall1989" by Unknown photographer, Reproduction by Lear 21 - Original photo by unknown author. Reproduction from public documentation/memorial by Lear 21. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons

  • lib/seed_data/reichstag.jpg "Berlin Reichstag 01" by Mihael Grmek - Own work. Licensed under Creative Commons Attribution-Share Alike 3.0 via Wikimedia Commons