chore(doc): add update_time config description

pull/914/head
ppoffice 2021-08-08 20:31:49 +00:00
parent ad7039e90b
commit 4cc04db669
No known key found for this signature in database
GPG Key ID: D872802C1F2A16AA
3 changed files with 44 additions and 0 deletions

View File

@ -130,6 +130,8 @@ article:
fold: unfolded
# Whether to show estimated article reading time
readtime: true
# Whether to show updated time. For "auto", shows article update time only when page.updated is set and it is different from page.date
update_time: false
# Article licensing block
licenses:
Creative Commons:

View File

@ -321,6 +321,27 @@ article:
readtime: true
{% endcodeblock %}
### Update Time
To show an update time of an article, set `updated` time in the article's front-matter:
{% codeblock post.md lang:yaml %}
title: Getting Started with Icarus
updated: 2020-04-01 00:00:00
---
Post content...
{% endcodeblock %}
Then, set `update_time` to `true` in the `article` section of your theme configuration file:
{% codeblock _config.icarus.yml lang:yaml %}
article:
update_time: true
{% endcodeblock %}
You may also set `update_time` to `false` to hide update time for all articles, or `auto`
to hide update time when it is the same as the article publication time.
### Article Licensing
You can show a section at the end of your posts/pages describing the licensing of your work.

View File

@ -320,6 +320,27 @@ article:
readtime: true
{% endcodeblock %}
### 文章更新时间
若要显示文章的更新时间请在文章的front_matter中设置`updated`时间:
{% codeblock post.md lang:yaml %}
title: Icarus快速上手
updated: 2020-04-01 00:00:00
---
Post content...
{% endcodeblock %}
然后,将主题配置文件的`article`部分的`update_time`设置为`true`
{% codeblock _config.icarus.yml lang:yaml %}
article:
update_time: true
{% endcodeblock %}
你也可以将`update_time`设置为`false`来隐藏所有文章的更新时间,或设置为`auto`而在文章的更新时间
与发布时间相同时隐藏更新时间。
### 文章许可协议
你可以在你的文章/页面的底部展示你的作品的使用许可,许可链接可以是文字或者图标。