【发布时间】:2016-03-23 13:29:26
【问题描述】:
我正在使用 Jekyll (3.0+),我有我的 index.html:
---
layout: mylayout
---
<div>
{{ site.posts[0].content }}
</div>
如您所见,我试图只显示第一篇文章,_layouts/mylayout.html 是:
<article itemtype="http://schema.org/BlogPosting">
<header>
<h1>{{ page.title }}</h1>
</header>
<div>
{{ content }}
</div>
</article>
不包括布局
问题是我看不到mylayout.html的包装结构,我只能看到内容降价翻译!所以,我本来期望:
<article itemtype="http://schema.org/BlogPosting">
<header>
<h1>Page title</h1>
</header>
<div>
<section>My post paragraph</section>
<p>Hello, this is my post.</p>
</div>
</article>
但我得到了这个:
<div>
<section>My post paragraph</section>
<p>Hello, this is my post.</p>
</div>
我怎样才能引用整个页面?
【问题讨论】:
标签: jekyll liquid github-pages