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
[MkDocs](https://www.mkdocs.org/) offers possibilities to [customize an existing theme](https://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme).
27
+
[MkDocs](https://www.mkdocs.org/) offers possibilities to [customize an existing theme](https://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme). See two examples below:
28
28
29
-
As an example, if you use [mkdocs-material](https://github.com/squidfunk/mkdocs-material) you can implement git-authors by [overriding a template block](https://squidfunk.github.io/mkdocs-material/customization/#overriding-template-blocks):
29
+
### mkdocs-material theme
30
30
31
-
1) Create a new file `main.html` in `docs/theme`:
31
+
If you use the [mkdocs-material](https://github.com/squidfunk/mkdocs-material) theme you can implement git-authors by [overriding a template block](https://squidfunk.github.io/mkdocs-material/customization/#overriding-blocks):
32
+
33
+
1) Create a new file `main.html` in `docs/overrides`:
32
34
33
35
```html
34
36
{% extends "base.html" %}
35
37
36
-
{% block disqus %}
38
+
{% block content %}
39
+
{{ super() }}
40
+
41
+
{% if git_page_authors %}
37
42
<divclass="md-source-date">
38
-
<small>
39
-
Authors: {{ git_page_authors }}
40
-
</small>
41
-
</div>
42
-
{% include "partials/integrations/disqus.html" %}
43
+
<small>
44
+
Authors: {{ git_page_authors }}
45
+
</small>
46
+
</div>
47
+
{% endif %}
43
48
{% endblock %}
44
49
```
45
50
@@ -48,7 +53,40 @@ As an example, if you use [mkdocs-material](https://github.com/squidfunk/mkdocs-
48
53
```yml
49
54
theme:
50
55
name: material
51
-
custom_dir: docs/theme/
56
+
custom_dir: docs/overrides
57
+
```
58
+
59
+
### mkdocs theme
60
+
61
+
In the default MkDocs theme we can use overriding partials to add the git-authors info below the page content.
62
+
63
+
1) Create a new file `content.html` in `docs/overrides`:
64
+
65
+
```html
66
+
<!-- Overwrites content.html base mkdocs theme, taken from
0 commit comments