我正在使用nanoc,我希望我的index.html指向特定的布局,所以我创建了这个布局,它被称为nosidebar.html
我的规则如下:
compile 'index.html' do
layout 'nosidebar'
end
Run Code Online (Sandbox Code Playgroud)
这似乎不起作用.我究竟做错了什么?
Phr*_*zen 11
您可以随时添加以下内容:
compile '*' do
if item.binary?
# don’t filter binary items
else
layout item[:layout] || 'default'
end
end
Run Code Online (Sandbox Code Playgroud)
这意味着您可以通过添加以下内容来确定文件上的模板:
---
layout: nosidebar
---
Run Code Online (Sandbox Code Playgroud)
在文件的yaml前面的事情.
归档时间: |
|
查看次数: |
800 次 |
最近记录: |