我是一名新手,正在学习jekyll:
目前为止,我已经按照教程所述完成了以下步骤:这是我在_layout:post.html文件中的内容:
---
layout: default
---
<div class="post">
<h1>{{ page.title }}</h1>
<span class="post-date">{{ page.date | date_to_string }}</span>
{{ content }}
</div>
<div class="related">
<h2>Related Posts</h2>
<ul class="related-posts">
{% for post in site.related_posts limit:3 %}
<li>
<h3>
<a href="{{ post.url }}">
{{ post.title }}
<small>{{ post.date | date_to_string }}</small>
</a>
</h3>
</li>
{% endfor %}
</ul>
</div>
我使用一个名为2014-01-01-myNewPost.md
的md文件,但是遇到了以下错误:
Generating... Invalid Date: '' is not a valid datetime.
Liquid Exception: exit in _layouts/post.html
我似乎没有看到任何问题,但无法真正弄清楚为什么它不起作用。