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: README.md
+39
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,45 @@ In your markdown files you can use the `{{ git_revision_date_localized }}` tag a
58
58
Last update: {{ git_revision_date_localized }}
59
59
```
60
60
61
+
### Extending existing themes
62
+
63
+
You can [customize an existing theme](https://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme) by overriding blocks or partials and using the `page.meta.git_revision_date_localized` tag.
64
+
65
+
To add a revision date to the default `mkdocs` theme by adding a `overrides/partials` folder to your `docs` folder and updating your `mkdocs.yml` file:
66
+
67
+
```yml
68
+
theme:
69
+
name: mkdocs
70
+
custom_dir: docs/overrides
71
+
```
72
+
73
+
And then adding a new file `docs/overrides/content.html` with the following content:
74
+
75
+
<details>
76
+
<summary>content.html</summary>
77
+
78
+
```html
79
+
<!-- Overwrites content.html base mkdocs theme, taken from
When writing your own [custom themes](https://www.mkdocs.org/user-guide/custom-themes/) you can use the `page.meta.git_revision_date_localized` jinja tag:
0 commit comments