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
Next, add the following lines to your`mkdocs.yml`:
22
22
23
23
```yaml
24
24
plugins:
25
+
- search
25
26
- git-revision-date-localized
26
27
```
27
28
29
+
> If you have no `plugins` entry in your config file yet, you'll likely also want to add the `search` plugin. MkDocs enables it by default if there is no `plugins` entry set.
30
+
28
31
## Usage
29
32
30
33
### In supported themes
31
34
32
-
- [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) offers support for this plugin, see [setup instructions](https://squidfunk.github.io/mkdocs-material/extensions/revision-date/)
35
+
- [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) offers support for this plugin, see [setup instructions](https://squidfunk.github.io/mkdocs-material/plugins/revision-date/)
33
36
34
37
### In theme templates
35
38
@@ -49,19 +52,18 @@ In your markdown files you can use `{{ git_revision_date_localized }}`:
49
52
Last update: {{ git_revision_date_localized }}
50
53
```
51
54
52
-
53
55
## Options
54
56
55
57
### `type`
56
58
57
-
Set this option to one of `date`, `datetime`, `iso_date`, `iso_datetime` or `timeago`. Default is `date`. Example outputs:
59
+
To change the date format, set the `type` parameter to one of `date`, `datetime`, `iso_date`, `iso_datetime` or `timeago`. Default is `date`. Example outputs:
58
60
59
61
```bash
60
-
28 November, 2019 # type: date
61
-
28 November, 2019 13:57:28 # type: datetime
62
-
2019-11-28 # type: iso_date
63
-
2019-11-28 13:57:26 # type: iso_datetime
64
-
20 hours ago # type: timeago
62
+
28 November, 2019 # type: date
63
+
28 November, 2019 13:57:28 # type: datetime
64
+
2019-11-28 # type: iso_date
65
+
2019-11-28 13:57:26 # type: iso_datetime
66
+
20 hours ago # type: timeago
65
67
```
66
68
67
69
### `locale`
@@ -82,5 +84,11 @@ Example of setting both options:
0 commit comments