根中的博客循环打破格式化/解析 - jekyll网站

时间:2012-02-25 14:26:54

标签: yaml jekyll

我做了一个jekyll网站,一切都很好,花花公子。然后我决定将博客移到域的根目录。现在看来jekyll没有正确解析我的帖子。从帖子内容中删除所有格式。标题,突出显示和一切只是作为字符串输出。我的布局文件中的Html标签完好无损,其他所有内容都按预期工作。

这是我的index.html,它呈现了博客循环:

---
layout: main
title: my title
---
{% for post in site.posts %}
<article>
    <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<time datetime="{{ post.date | date: "%Y-%m-%d" }}"><span>{{ post.date |     date_to_string }}</span></time>
{{ post.content | postmorefilter: post.url, "Read the rest of this entry" }}
</article>
{% endfor %}

这是我的帖子(journal.html)的布局:

---
layout: main
---

<article>
    <h2>{{page.title}}</h2>
    {{ page.content }}
</article>

我的帖子使用layout: journal

我删除了已创建的网站,停止并启动了jekyll以及其他许多内容。

有什么建议吗?

1 个答案:

答案 0 :(得分:1)

嗯,事实证明这是我自己的错。

我的日记布局错了。我将{{ page.content }}更改为{{ content }} - étvoila!