1
Я пишу сайт с использованием nanoc и ruby, и я хочу использовать SCSS. Но у меня проблема. Независимо от того, что я пытаюсь, я не могу заставить мой SCSS-файл преобразовывать и выводить как скомпилированный CSS. Он либо генерирует ошибку, либо проходит через точно такой же тип файла. Ниже приведен мой файл правил и директорий Ruby, пожалуйста, помогите!Фильтр Nanoc для SCSS
#!/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