Since Spree 4.3 this extension is deprecated and not needed. Spree 4.3 includes a built-in CMS system that surpasses this extension.
Simple, easy to use Shopify style pages for Spree 4.2 and up, with Action Text (TRIX rich text editor) ready via configs.
-
Add this extension to your Gemfile with this line:
gem 'spree_pages', github: 'matthewkennedy/spree_pages', branch: 'main'
-
Install the gem using Bundler
bundle install
-
Copy & run migrations
bundle exec rails g spree_pages:install
-
Restart your server
If your server was running, restart it so that it can find the assets properly.
If you wish to use Rails 6 built in TRIX rich text editor with Action Text for your pages set the following Spree config, and make sure you have Action Text installed. See this guide to Using Action Text with Spree if needed.
#In -> config/initializers/spree.rb
SpreePages::Config.use_action_text = true
If you are not using Action Text but wish to use raw HTML in your pages you can use the following config:
#In -> config/initializers/spree.rb
SpreePages::Config.use_raw_body_text = true
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle
bundle exec rake
When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
require 'spree_pages/factories'
If you'd like to contribute, please take a look at the instructions for installing dependencies and crafting a good pull request.
Copyright (c) 2020 Matthew Kennedy, released under the New BSD License