【发布时间】:2014-10-19 05:44:05
【问题描述】:
所以,试试 nanoc。
已将输出文件夹上传到 github 上的 gh-pages。
css 无法显示其样式。
尝试在规则中添加filter :relativize_paths, :type => :css。
再次编译。
它仍然无法正常显示。
我做错了什么?
可以看到页面显示不正常:http://arubyist.github.io/nanoc/
这是规则页面:
compile '*' do
if item[:extension] == 'css'
# don’t filter stylesheets
elsif item.binary?
# don’t filter binary items
else
filter :erb
layout 'default'
end
end
route '*' do
if item[:extension] == 'css'
# Write item with identifier /foo/ to /foo.css
item.identifier.chop + '.css'
elsif item.binary?
# Write item with identifier /foo/ to /foo.ext
item.identifier.chop + '.' + item[:extension]
else
# Write item with identifier /foo/ to /foo/index.html
item.identifier + 'index.html'
end
end
layout '*', :erb
compile '/html' do
filter :relativize_paths, :type => :html
end
compile '/css' do
filter :relativize_paths, :type => :css
end
【问题讨论】:
标签: ruby nanoc github-pages static-site