Skip to content

Commit

Permalink
Update guides for v2.1 (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bramjetten authored Jul 3, 2021
1 parent cf39e1a commit cc6acba
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 28 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Spina CMS Changelog

## 2.1 (Unreleased)
## 2.1 (July 3rd, 2021)

* Refactored all javascript with Hotwire
* Refactored all CSS with TailwindCSS
Expand All @@ -13,7 +13,7 @@

## 2.0

⚠️ _Beware: lots of changes regarding page content. The old page parts are gone in favor of new JSON-based parts. Read the [Upgrading Guide](https://www.spinacms.com/guide/getting-started/upgrading-from-v1) to learn how to upgrade._
⚠️ _Beware: lots of changes regarding page content. The old page parts are gone in favor of new JSON-based parts. Read the [Upgrading Guide](https://www.spinacms.com/docs/getting-started/upgrading) to learn how to upgrade._

### 2.0.2 (March 19th, 2021)
* Fixed issue with webp images
Expand Down
13 changes: 0 additions & 13 deletions docs/v2/0_introduction.md

This file was deleted.

17 changes: 16 additions & 1 deletion docs/v2/1_getting_started.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Getting started

Spina is a CMS for Rails 6.0.
Spina is a CMS for Rails 6.1. If you want to get started quickly, create a new Ruby on Rails app with a PostgreSQL database and ActiveStorage enabled and follow these instructions:

Add the following line to your Gemfile:

```ruby
gem 'spina'
```

Run the installer to start the setup process:

rails g spina:install

The installer will help you create your first user.

Then start `rails s` and access Spina at `/admin`.

13 changes: 8 additions & 5 deletions docs/v2/advanced/1_create_custom_parts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ end

## Step 2. Create a view for page editing

```haml
-# app/views/spina/admin/parts/movies/_form.html.haml
.page-form-label= f.object.title
.page-form-control
.select-dropdown= f.select :movie_id, Movie.all.pluck(:name, :id)
```erb
<!-- app/views/spina/admin/parts/movies/_form.html.erb -->
<div class="mt-6">
<label class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
<div class="mt-1">
<%= f.select :movie_id, Movie.all.pluck(:name, :id) %>
</div>
</div>
```

## Step 3. Register your new part
Expand Down
3 changes: 1 addition & 2 deletions docs/v2/getting_started/1_installing_ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

Before you can install Spina, you need to have Ruby and Rails installed first. Here are a couple of excellent resources to do that:

- [Install Ruby on Rails (gorails.com)](https://gorails.com/setup)
- [Installing Ruby (ruby-lang.org)](https://www.ruby-lang.org/en/documentation/installation/)
- [Getting Started with Rails (guides.rubyonrails.org)](https://guides.rubyonrails.org/getting_started.html)

If you're on a Mac you should something like `rbenv` to manage different versions of Ruby.

## Database

You need a database to store all of your content. Spina CMS requires a PostgreSQL database. You can install it using several ways. If you're on a Mac we recommend using `homebrew` so you can simply run `brew install postgresql`.
8 changes: 7 additions & 1 deletion docs/v2/getting_started/2_installing_spina.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ Start by creating a new Rails app using a PostgreSQL database.
rails new yourwebsite --database=postgresql
```

After generating a new app, add the following line to your Gemfile:
Run the ActiveStorage installer to install ActiveStorage.

```
rails active_storage:install
```

After that, add the following line to your Gemfile:

```
gem 'spina'
Expand Down
4 changes: 1 addition & 3 deletions docs/v2/themes/6_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ Every resource can have the following attributes:
- label
- view_template
- order_by
- parent_page_id

When defining a parent page, all pages within that resource will be scoped to that parent page. This means that all generated URL's will be prefixed with the parent page's URL. An example: you can create a regular page called `blog` and have a resource called `blogposts`. Your blog view template could then list all pages that are inside the blog resource. In Spina you would have a nice separate menu called "Blogposts" where you can easily manage a list of blogposts.
- slug

**Updating resources and page slugs/paths**

Expand Down
2 changes: 1 addition & 1 deletion spina.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
gem.metadata = {
"homepage_uri" => "https://www.spinacms.com",
"bug_tracker_uri" => "https://github.com/SpinaCMS/Spina/issues",
"documentation_uri" => "https://www.spinacms.com/guide",
"documentation_uri" => "https://www.spinacms.com/docs",
"changelog_uri" => "https://github.com/SpinaCMS/Spina/blob/master/CHANGELOG.md",
"source_code_uri" => "https://github.com/SpinaCMS/Spina",
}
Expand Down

0 comments on commit cc6acba

Please sign in to comment.