Skip to content

Commit 6df930d

Browse files
committed
Document timeago.js injection, closes #81
1 parent 91eb3b4 commit 6df930d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/available-variables.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,23 @@ To allow for more flexibility when overriding a theme there are also variables f
3838
- `page.meta.git_site_revision_date_localized_raw_iso_datetime`
3939
- `page.meta.git_site_revision_date_localized_raw_timeago`
4040

41-
And if you've enable creation date in the config:
41+
And if you've enabled creation date in the config:
4242

4343
- `page.meta.git_creation_date_localized_raw_date`
4444
- `page.meta.git_creation_date_localized_raw_datetime`
4545
- `page.meta.git_creation_date_localized_raw_iso_date`
4646
- `page.meta.git_creation_date_localized_raw_iso_datetime`
4747
- `page.meta.git_creation_date_localized_raw_timeago`
48+
49+
!!! warning "timeago.js dependency"
50+
51+
The `*_timeago` variables require the [timeago.js](https://timeago.org/) dependency. This is automatically injected when the [option](optiond.md) `type: timeago` is set. Alternatively, you can add [timeago.js](https://timeago.org/) using the [`extra_javascript`](https://www.mkdocs.org/user-guide/configuration/#extra_javascript) option of MkDocs:
52+
53+
```yaml
54+
# mkdocs.yml
55+
extra_javascript:
56+
- js/timeago.min.js
57+
- js/timeago_mkdocs_material.js
58+
```
59+
60+
You can download both these [files from GitHub](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/tree/master/mkdocs_git_revision_date_localized_plugin/js).

0 commit comments

Comments
 (0)