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:
1919More information about plugins in the [MkDocs documentation][mkdocs-plugins].
2020
2121# # 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)*.
2323
24- # # Example
24+ # ## Templates - `page.meta.revision_date`:
25+ # ### Example
2526` ` ` django hljs
2627{% block footer %}
2728<hr>
@@ -35,11 +36,37 @@ Use `page.meta.revision_date` in templates to access the revision date of the cu
3536</p>
3637{% endblock %}
3738` ` `
38-
3939More information about templates [here][mkdocs-template].
4040
4141More information about blocks [here][mkdocs-block].
4242
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+
4359[mkdocs-plugins] : http://www.mkdocs.org/user-guide/plugins/
4460[mkdocs-template] : https://www.mkdocs.org/user-guide/custom-themes/#template-variables
4561[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