README.md in spina-0.11.1 vs README.md in spina-0.12.0
- old
+ new
@@ -1,17 +1,17 @@
![Spina CMS](http://www.spinacms.com/spinacms.png)
[Visit the website](http://www.spinacms.com)
-[![Codeship Status for denkGroot/Spina](https://img.shields.io/codeship/e13debf0-e6af-0132-8abf-32d84f3372de.svg)](https://codeship.com/projects/82322)
+[![CircleCI](https://img.shields.io/circleci/project/github/denkGroot/Spina.svg)](https://circleci.com/gh/denkGroot/Spina)
[![Code Climate](https://codeclimate.com/github/denkGroot/Spina/badges/gpa.svg)](https://codeclimate.com/github/denkGroot/Spina)
[![Test Coverage](https://codeclimate.com/github/denkGroot/Spina/badges/coverage.svg)](https://codeclimate.com/github/denkGroot/Spina/coverage)
[![Slack](https://slack-spinacms.herokuapp.com/badge.svg)](https://slack-spinacms.herokuapp.com)
# Getting Started
-Spina is a CMS built upon the Rails framework. This guide is designed for developers with experience using Ruby on Rails.
+Spina is a CMS for Rails 5.1. This guide is designed for developers with experience using Ruby on Rails.
To start using Spina CMS add the following line to your Gemfile:
```ruby
gem 'spina'
@@ -21,12 +21,19 @@
rails g spina:install
The installer will help you setup your first user.
-Then start `rails s` and access your admin panel at `/admin`.
+Then start `rails s` and access Spina at `/admin`.
+## Upgrading from 0.11 to 0.12
+
+Just run the new migrations.
+
+ rails spina:install:migrations
+ rails db:migrate
+
## Upgrading from 0.10 to 0.11
The spina-template gem is merged into the spina gem. You don't have to use the original spina-template gem anymore.
## Upgrading from 0.9 to 0.10
@@ -65,22 +72,22 @@
# Basics
The installer generates a few initializers that contain necessary configuration for Spina.
-In the initializers folder there's a new folder named `themes`. Inside you will find a configuration file named `default.rb`. This file contains all of your theme-specific settings. You can define multiple Page parts, Layout parts, View templates and Custom pages.
+In the initializers folder there's a new folder named `themes`. Inside you will find a configuration file named `default.rb`. This file contains all of your theme-specific settings. You can define multiple Page parts, View templates and Custom pages.
## Page parts
A page in Spina has many Page parts. By default these page parts can be one of the following:
- `Spina::Line`
- `Spina::Text`
- `Spina::Photo`
- `Spina::PhotoCollection`
-- `Spina::Color`
- `Spina::Structure`
+- `Spina::Option`
These are the building blocks of your view templates. You can have an unlimited number of page parts in a page. We prefer to keep the number of parts to a minimum so that managing your pages won't become too complex.
Spina uses an initializer to create the basic building blocks of your page. There are three steps to add a new building block or page part to your app:
@@ -172,21 +179,43 @@
<%= @page.content(:portfolio).try(:html_safe) %> # added this line
```
We have successfully added another textbox! Restart your server and load up the admin section again. You should see another text box below the content box.
-## Layout parts
-
-Sometimes you need editable content that's not specific to a view template but to your theme as a whole. You can use the following parts in your layout.
-
-- `Spina::Line`
-- `Spina::Color`
-
## View templates
Each theme typically has a few different view templates which make up your website. By default Spina generates a *homepage* and *show* template.
The views for these templates are stored in `app/views/default/pages`.
+
+## Navigations
+
+Usually managing a single list of pages is enough for most use cases. Sometimes however, you need a little more flexibility. This is where navigations come in. You can create multiple navigations which are basically different collections of your pages. You can choose to include all or just a few of your pages. You can also edit the order of pages per navigation.
+
+You define navigations in your theme's config file:
+
+```ruby
+::Spina::Theme.register do |theme|
+ # ...
+
+ theme.navigations = [{
+ name: 'main',
+ label: 'Main navigation',
+ auto_add_pages: true
+ }, {
+ name: 'mobile',
+ label: 'Mobile'
+ }]
+
+ # ...
+end
+```
+
+`auto_add_pages` ensures that each page that you create automatically gets added to this navigation.
+
+Besides navigations there's always a single overview of all pages. Your sitemap and friendly URLs are generated based on this overview.
+
+Creating navigations is optional.
## Custom pages
You can define custom pages for your theme that will be generated when bootstrapping your website. You can define whether or not they're deletable. By default Spina creates a custom page named Homepage which is not deletable.