【发布时间】:2017-11-06 12:05:56
【问题描述】:
我刚开始学习 Jekyll,但遇到了一点小障碍。
我的 _layout 文件夹中有 2 个布局,基本上如下所示:-
default.html
<html>
<head> <!-- Meta Tags etc --> </head>
<body>
{{ content }}
</body>
</html>
hero.html
---
layout: default
---
<section id="hero">
<h3>{{ hero.descr }}</h3>
</section>
{{ content }}
我的索引页面扩展英雄布局如下:-
index.html
---
layout: hero
descr: Hello there.
---
布局工作得很好,网站显示正常,除了 hero.descr 变量。标题标签是空的。
【问题讨论】: