开发者

How to setup Compass in refinery CMS without refinery-theming plugin?

开发者_开发技巧According this discussion, refinery-theming plugin is required while using Compass in refinery CMS. But refinery-theming's page said it's no longer command to use it. Is there anyway to use Compass in refinery without theming plugin? Thanks a lot.


I am using Compass in a Refinery site by doing the following:

1) Add Compass dependencies to your Gemfile:

gem "compass"
gem "haml"

2) Run bundle install

3) Initialise the app for compass

compass init rails /path/to/myrailsproject

4) Override the Refinery shared/_head.html.erb partial:

rake refinery:override view=shared/_head

5) Add following stylesheet link tags to shared/_head.html.erb:

<%= stylesheet_link_tag 'screen', :media => 'screen, projection' %>
<%= stylesheet_link_tag 'print', :media => 'print' %>

<!--[if IE ]>
<%= stylesheet_link_tag 'ie.css', :media => 'screen, projection' %>
<![endif]-->

6) Personally I remove all other stylesheet_link_tag's from shared/_head.html.erb

7) Your styles should now be added to app/stylesheets/screen.scss and included partials

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜