You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/options.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ You can customize the plugin by setting options in `mkdocs.yml`. For example:
8
8
plugins:
9
9
- git-revision-date-localized:
10
10
type: timeago
11
+
custom_format: "%d. %B %Y"
11
12
timezone: Europe/Amsterdam
12
13
locale: en
13
14
fallback_to_build_date: false
@@ -19,16 +20,21 @@ You can customize the plugin by setting options in `mkdocs.yml`. For example:
19
20
20
21
## `type`
21
22
22
-
Default is `date`. The format of the date to be displayed. Valid values are `date`, `datetime`, `iso_date`, `iso_datetime`and `timeago`. Example outputs:
23
+
Default is `date`. The format of the date to be displayed. Valid values are `date`, `datetime`, `iso_date`, `iso_datetime`, `timeago` and `custom`. Example outputs:
23
24
24
25
```yaml
25
26
November 28, 2019 # type: date (default)
26
27
November 28, 2019 13:57:28 # type: datetime
27
28
2019-11-28 # type: iso_date
28
29
2019-11-28 13:57:26 # type: iso_datetime
29
30
20 hours ago # type: timeago
31
+
28. November 2019 # type: custom
30
32
```
31
33
34
+
## `custom_format`
35
+
36
+
Default is `%d. %B %Y`. The date format used when `type: custom`. Passed to python's `strftime`, see the [cheatsheat](https://strftime.org/) for details.
37
+
32
38
## `timezone`
33
39
34
40
Default is `UTC`. Specify a time zone database name ([reference](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)). This option is especially relevant when using `type: datetime` and `type: iso_datetime`. Note that when using [timeago](http://timeago.yarp.com/) (with `type: timeago`) any difference in time zones between server and client will be handled automatically.
0 commit comments