Skip to content

Commit

Permalink
docs(configuration): add updated_option (hexojs#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW authored Jul 27, 2020
1 parent bd65374 commit c1bf65b
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 7 deletions.
12 changes: 11 additions & 1 deletion source/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,17 @@ Setting | Description | Default
--- | --- | ---
`date_format` | Date format | `YYYY-MM-DD`
`time_format` | Time format | `HH:mm:ss`
`use_date_for_updated` | Use the date of the post in [`post.updated`](/docs/variables#Page-Variables) if no updated date is provided in the front-matter. Typically used with Git workflow | `true`
`updated_option` | The [`updated`](/docs/variables#Page-Variables) value to used when not provided in the front-matter | `mtime`

{% note info updated_option %}
`updated_option` controls the `updated` value when not provided in the front-matter:

- `mtime`: Use file modification date as `updated`. It is the default behavior of Hexo since 3.0.0
- `date`: Use `date` as `updated`. Typically used with Git workflow when file modification date could be different.
- `empty`: Simply drop `updated` when not provided. May not be compatible with most themes and plugins.

`use_date_for_updated` is deprecated and will be removed in next major version. Please use `updated_option: 'date'` instead.
{% endnote %}

### Pagination

Expand Down
12 changes: 11 additions & 1 deletion source/ko/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,17 @@ Hexo는 날짜 처리 시 [Moment.js](http://momentjs.com/)를 사용합니다.
--- | --- | ---
`date_format` | 날짜 형식 | `YYYY-MM-DD`
`time_format` | 시간 형식 | `HH:mm:ss`
`use_date_for_updated` | Use the date of the post in [`post.updated`](/ko/docs/variables#페이지 변수) if no updated date is provided in the front-matter. Typically used with Git workflow | `true`
`updated_option` | The [`updated`](/ko/docs/variables#페이지 변수) value to used when not provided in the front-matter | `mtime`

{% note info updated_option %}
`updated_option` controls the `updated` value when not provided in the front-matter:

- `mtime`: Use file modification date as `updated`. It is the default behavior of Hexo since 3.0.0
- `date`: Use `date` as `updated`. Typically used with Git workflow when file modification date could be different.
- `empty`: Simply drop `updated` when not provided. May not be compatible with most themes and plugins.

`use_date_for_updated` is deprecated and will be removed in next major version. Please use `updated_option: 'date'` instead.
{% endnote %}

### Pagination

Expand Down
12 changes: 11 additions & 1 deletion source/pt-br/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,17 @@ Configuração | Descrição | Padrão
--- | --- | ---
`date_format` | Formato de data | `YYYY-MM-DD`
`time_format` | Formado de hora | `HH:mm:ss`
`use_date_for_updated` | Use the date of the post in [`post.updated`](/pt-br/docs/variables#Variaveis-da-Pagina) if no updated date is provided in the front-matter. Typically used with Git workflow | `true`
`updated_option` | The [`updated`](/pt-br/docs/variables#Variaveis-da-Pagina) value to used when not provided in the front-matter | `mtime`

{% note info updated_option %}
`updated_option` controls the `updated` value when not provided in the front-matter:

- `mtime`: Use file modification date as `updated`. It is the default behavior of Hexo since 3.0.0
- `date`: Use `date` as `updated`. Typically used with Git workflow when file modification date could be different.
- `empty`: Simply drop `updated` when not provided. May not be compatible with most themes and plugins.

`use_date_for_updated` is deprecated and will be removed in next major version. Please use `updated_option: 'date'` instead.
{% endnote %}

### Paginação

Expand Down
12 changes: 11 additions & 1 deletion source/ru/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,17 @@ Hexo использует [Moment.js](http://momentjs.com/) для работы
--- | --- | ---
`date_format` | Формат даты | `YYYY-MM-DD`
`time_format` | Формат времени | `HH:mm:ss`
`use_date_for_updated` | Use the date of the post in [`post.updated`](/ru/docs/variables#Переменные-страницы) if no updated date is provided in the front-matter. Typically used with Git workflow | `true`
`updated_option` | The [`updated`](/ru/docs/variables#Переменные-страницы) value to used when not provided in the front-matter | `mtime`

{% note info updated_option %}
`updated_option` controls the `updated` value when not provided in the front-matter:

- `mtime`: Use file modification date as `updated`. It is the default behavior of Hexo since 3.0.0
- `date`: Use `date` as `updated`. Typically used with Git workflow when file modification date could be different.
- `empty`: Simply drop `updated` when not provided. May not be compatible with most themes and plugins.

`use_date_for_updated` is deprecated and will be removed in next major version. Please use `updated_option: 'date'` instead.
{% endnote %}

### Разбивка на страницы

Expand Down
12 changes: 11 additions & 1 deletion source/th/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,17 @@ Setting | Description | Default
--- | --- | ---
`date_format` | Date format | `YYYY-MM-DD`
`time_format` | Time format | `HH:mm:ss`
`use_date_for_updated` | Use the date of the post in [`post.updated`](/th/docs/variables#Page-Variables) if no updated date is provided in the front-matter. Typically used with Git workflow | `true`
`updated_option` | The [`updated`](/th/docs/variables#Page-Variables) value to used when not provided in the front-matter | `mtime`

{% note info updated_option %}
`updated_option` controls the `updated` value when not provided in the front-matter:

- `mtime`: Use file modification date as `updated`. It is the default behavior of Hexo since 3.0.0
- `date`: Use `date` as `updated`. Typically used with Git workflow when file modification date could be different.
- `empty`: Simply drop `updated` when not provided. May not be compatible with most themes and plugins.

`use_date_for_updated` is deprecated and will be removed in next major version. Please use `updated_option: 'date'` instead.
{% endnote %}

### Pagination

Expand Down
14 changes: 13 additions & 1 deletion source/zh-cn/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,19 @@ Hexo 使用 [Moment.js](http://momentjs.com/) 来解析和显示时间。
--- | --- | ---
`date_format` | 日期格式 | `YYYY-MM-DD`
`time_format` | 时间格式 | `HH:mm:ss`
`use_date_for_updated` | 启用以后,如果 Front Matter 中没有指定 `updated`[`post.updated`](/zh-cn/docs/variables#页面变量) 将会使用 `date` 的值而不是文件的创建时间。在 Git 工作流中这个选项会很有用 | `true`
`updated_option` | 当 Front Matter 中没有指定 [`updated`](/zh-cn/docs/variables#页面变量)`updated` 的取值 | `mtime`

{% note info updated_option %}
`updated_option` 控制了当 Front Matter 中没有指定 `updated` 时,`updated` 如何取值:

- `mtime`: 使用文件的最后修改时间。这是从 Hexo 3.0.0 开始的默认行为。
- `date`: 使用 `date` 作为 `updated` 的值。可被用于 Git 工作流之中,因为使用 Git 管理站点时,文件的最后修改日期常常会发生改变
- `empty`: 直接删除 `updated`。使用这一选项可能会导致大部分主题和插件无法正常工作。

`use_date_for_updated` 选项已经被废弃,将会在下个重大版本发布时去除。请改为使用 `updated_option: 'date'`
{% endnote %}

`use_date_for_updated` | 启用以后,如果 Front Matter 中没有指定 `updated`[`post.updated`]() 将会使用 `date` 的值而不是文件的创建时间。在 Git 工作流中这个选项会很有用 | `true`

## 分页

Expand Down
12 changes: 11 additions & 1 deletion source/zh-tw/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,17 @@ Hexo 使用 [Moment.js](http://momentjs.com/) 來解析和顯示時間。
--- | --- | ---
`date_format` | 日期格式 | `YYYY-MM-DD`
`time_format` | 時間格式 | `HH:mm:ss`
`use_date_for_updated` | Use the date of the post in [`post.updated`](/zh-tw/docs/variables#頁面變數) if no updated date is provided in the front-matter. Typically used with Git workflow | `true`
`updated_option` | The [`updated`](/zh-tw/docs/variables#頁面變數) value to used when not provided in the front-matter | `mtime`

{% note info updated_option %}
`updated_option` controls the `updated` value when not provided in the front-matter:

- `mtime`: Use file modification date as `updated`. It is the default behavior of Hexo since 3.0.0
- `date`: Use `date` as `updated`. Typically used with Git workflow when file modification date could be different.
- `empty`: Simply drop `updated` when not provided. May not be compatible with most themes and plugins.

`use_date_for_updated` is deprecated and will be removed in next major version. Please use `updated_option: 'date'` instead.
{% endnote %}

### 分頁

Expand Down

0 comments on commit c1bf65b

Please sign in to comment.