octopress中,生成的文章标题上面的日期无法显示
我的博客测试地址: xiaoke.me
ruby octopress github-pages jekyll JavaScript
Answers
时间的问题我已经解决了,围观的同学或者遇到问题的同学看一下下面的代码就好,具体路径在这里:
\octopress\source_includes\post\date.html
代码:
{% capture date %}{{ page.date }}{{ post.date }}{% endcapture %}
{% capture date_formatted %}{% if page.date %}{{ page.date | date: site.date_format }}{% endif %}{% if post.date %}{{ post.date | date: site.date_format }}{% endif %}{% endcapture %}
{% capture has_date %}{{ date | size }}{% endcapture %}
{% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %}
{% capture updated_formatted %}{% if page.updated %}{{ page.updated | date: site.date_format }}{% endif %}{% if post.updated %}{{ post.updated | date: site.date_format }}{% endif %}{% endcapture %}
{% capture was_updated %}{{ updated | size }}{% endcapture %}
{% if has_date != '0' %}
{% capture time %}
<time if="if" updated="updated" data-updated="true" endif="endif" itemprop="datePublished dateCreated">
{{ date_formatted }}
</time>
{% endcapture %}
{% endif %}
{% if was_updated != '0' %}
{% capture updated %}
<time class="updated" itemprop="dateModified">
Updated {{ updated_formatted }}
</time>
{% endcapture %}
{% else %}{% assign updated = false %}{% endif %}