LoginSignup
0
0

More than 1 year has passed since last update.

refinarycms-blogの使い方

Posted at

概要

refinarycms-blogの使い方について説明します
この内容について書かれている記事が少なかったので助けになれば幸いです

前提

既にrefinarycmsを導入したサイトにblog機能を追加する形で実装していきます
その実装方法についてはこちらの記事で紹介しています

実装

install

作成したrefinerycmsを導入したサイトのgemfileを開いて、一番下の行に下のコードを追加します。

Gemfile
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'

その後ターミナルでbundle installをしてください

※うまくいかない場合はbundle updateをするとうまくいくことがあります

次にターミナルで以下のコマンドを実行して、blogのbackend javascript fileをオーバーライドします

terminal
rake refinery:override javascript=blog/backend

作成した、backend.jsファイルを編集します
ファイルを開いて、最初の行を以下のように変更します

app/assets/javascripts/refinery/blog/backend.js
//= require jquery-ui/widgets/autocomplete ←消去
//= require jquery-ui/autocomplete  ←追加

※これをしないとquery-ui/widgets/autocomplete not foundというエラーが出ます

次に以下のコマンドを実行してブログプラグインをインストールします

terminal
rails generate refinery:blog

最後に以下のコマンドを実行すれば完了です

terminal
rake db:migrate
terminal
rake db:seed

参考

https://github.com/refinery/refinerycms-blog
https://github.com/refinery/refinerycms-blog/issues/510

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0