
- 修改(博客主目录)
/themes/next/layout/_macro/post.swig文件,在<span class="post-time">...</span>标签后添加
1
2
3
4
5
6
7
8{%if post.updated and post.updated > post.date%}
<span class="post-updated">
| {{ __('post.updated') }}
<time itemprop="dateUpdated" datetime="{{ moment(post.updated).format() }}" content="{{ date(post.updated, config.date_format) }}">
{{ date(post.updated, config.date_format) }}
</time>
</span>
{% endif %}

- 根据博客配置文件中的
language参数修改对应的语言配置文件(博客主目录)/themes/next/languages/zh_Hans.yml
1
2post:
updated: 更新于 - 修改主题配置文件(博客主目录)
/themes/next/_config.yml,增加一行
1
display_updated: true
- 写文章的时候可以直接在文章开头设置更新时间
1
updated: 2018-01-01 12:00:00
- 没有这参数的话将会显示md文件的修改日期




近期评论