1

nanocとrubyを使ってサイトを書いていて、SCSSを使いたいです。しかし、私は少し問題があります。何を試しても、SCSS ファイルを変換してコンパイル済みの CSS として出力することができません。エラーが発生するか、まったく同じファイル タイプとして表示されます。私の Ruby ルール ファイルとディレクトリ構造は以下のとおりです。助けてください!

#!/usr/bin/env ruby

compile '/**/*.html' do
  layout '/default.*'
end

# This is an example rule that matches Markdown (.md) files, and filters them
# using the :kramdown filter. It is commented out by default, because kramdown
# is not bundled with Nanoc or Ruby.
#
#compile '/**/*.md' do
#  filter :kramdown
#  layout '/default.*'
#end

route '/**/*.{html,md}' do
  if item.identifier =~ '/index.*'
    '/index.html'
  else
    item.identifier.without_ext + '/index.html'
  end
end

compile '/assets/SCSS/' do
  filter :scss => :css
  write @item.identifier.without_ext + '.css'
 end

compile '/assets/images/*' do
  write item.identifier.to_s
end

compile '/**/*' do
  write item.identifier.to_s
end

layout '/**/*', :erb

これが私のディレクトリ構造です:

root
|
|\_content
|  |
|   \_assets
|     |
|      \_test.scss
\_public
  |
   \_assets
     |
      \_test.scss <-------- This should be compiled CSS
4

2 に答える 2