File tree Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Expand file tree Collapse file tree 1 file changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ plugins:
19
19
More information about plugins in the [MkDocs documentation][mkdocs-plugins].
20
20
21
21
# # Usage
22
- Use `page.meta.revision_date` in templates to access the revision date of the current page in ISO format *(YYYY-mm-dd)*.
22
+ The revision date will be displayed in ISO format *(YYYY-mm-dd)*.
23
23
24
- # # Example
24
+ # ## Templates - `page.meta.revision_date`:
25
+ # ### Example
25
26
` ` ` django hljs
26
27
{% block footer %}
27
28
<hr>
@@ -35,11 +36,37 @@ Use `page.meta.revision_date` in templates to access the revision date of the cu
35
36
</p>
36
37
{% endblock %}
37
38
` ` `
38
-
39
39
More information about templates [here][mkdocs-template].
40
40
41
41
More information about blocks [here][mkdocs-block].
42
42
43
+ # ## Markdown - `{{ git_revision_date }}`:
44
+ # ### Example
45
+ ` ` ` md
46
+ Page last revised on: {{ git_revision_date }}
47
+ ` ` `
48
+ If using [mkdocs_macro_plugin](mkdocs-macro), it must be included after our plugin.
49
+
50
+ i.e., mkdocs.yml :
51
+ ` ` ` yaml
52
+ plugins:
53
+ - search
54
+ - git-revision-date
55
+ - macros
56
+ ` ` `
57
+
58
+
43
59
[mkdocs-plugins] : http://www.mkdocs.org/user-guide/plugins/
44
60
[mkdocs-template] : https://www.mkdocs.org/user-guide/custom-themes/#template-variables
45
61
[mkdocs-block] : https://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
62
+ [mkdocs-macro] : https://github.com/fralau/mkdocs_macros_plugin
63
+
64
+ # # Options
65
+
66
+ # ## `enabled_if_env`
67
+
68
+ Setting this option will enable the build only if there is an environment variable set to 1. Default is not set.
69
+
70
+ # ## `modify_md`
71
+
72
+ Setting this option to false will disable the use of `{{ git_revision_date }}` in markdown files. Default is true.
You can’t perform that action at this time.
0 commit comments