【发布时间】:2015-06-27 11:17:21
【问题描述】:
我有一些 Haml 部分,其中许多包含样板
.container
.row
.col-lg-12
当我尝试将 = partial "site_section" 抽象出来时,我得到:
syntax error, unexpected keyword_end, expecting end-of-input end;end;end;end
我正在使用 ruby 2.2.2。
如何在 Middleman 的 Haml 部分中渲染 Haml 部分?
谢谢
更新 这显然是处理我的部分(上图)的某种特殊情况。我有其他部分内部分渲染得很好。
更新 对于这个this repo,布局实际上是:
_site_section:
.container
.row
.col-lg-12
_nested_section:
= partial "site_section"
MOAR (nested) HAML
index.haml:
=partial "nested_section"
【问题讨论】:
-
你能把你的文件发到
_site_section.haml吗? -
就是这样,上面:
.container等 -
@acsmith 有赏金,告诉你的朋友。
-
我刚试了,无法重现,请看github.com/chischaschos/middleman-test。你是这样用的吗?
-
@chischaschos 谢谢我在上面的问题中回复了你。
标签: ruby templates haml partials middleman