Skip to content

Shopify Style Pages For Spree 4.2 - With Action Text Built In.

License

Notifications You must be signed in to change notification settings

MatthewKennedy/spree_pages

Repository files navigation

⚠️ Deprecation Notice ⚠️

Since Spree 4.3 this extension is deprecated and not needed. Spree 4.3 includes a built-in CMS system that surpasses this extension.

spree_pages

CI Standard Rb

Simple, easy to use Shopify style pages for Spree 4.2 and up, with Action Text (TRIX rich text editor) ready via configs.

Installation

  1. Add this extension to your Gemfile with this line:

    gem 'spree_pages', github: 'matthewkennedy/spree_pages', branch: 'main'
  2. Install the gem using Bundler

    bundle install
  3. Copy & run migrations

    bundle exec rails g spree_pages:install
  4. Restart your server

If your server was running, restart it so that it can find the assets properly.

Configurations

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

Testing

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'

Contributing

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

About

Shopify Style Pages For Spree 4.2 - With Action Text Built In.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published