Skip to content

Commit 2aacefa

Browse files
committed
Add git-authors plugin to docs
1 parent 7a02a04 commit 2aacefa

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

.github/workflows/pythonpublish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
with:
13+
fetch_depth: '0'
1214
- name: Set up Python
1315
uses: actions/setup-python@v2
1416
with:
@@ -35,4 +37,5 @@ jobs:
3537
3638
- name: Deploy mkdocs site
3739
run: |
40+
pip install mkdocs-git-authors-plugin
3841
mkdocs gh-deploy --force

docs/overrides/main.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "base.html" %}
2+
3+
{% block content %}
4+
{{ super() }}
5+
6+
{% if git_page_authors %}
7+
<div class="md-source-date">
8+
<small>
9+
Authors: {{ git_page_authors | default('enable mkdocs-git-authors-plugin') }}
10+
</small>
11+
</div>
12+
{% endif %}
13+
{% endblock %}

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ nav:
1414

1515
theme:
1616
name: material
17+
custom_dir: docs/overrides
1718
icon:
1819
logo: material/calendar-outline
1920
repo: fontawesome/brands/github
2021

2122
plugins:
2223
- search
24+
- git-authors:
25+
exclude:
26+
- index.md
2327
- git-revision-date-localized:
2428
type: timeago
2529
timezone: Europe/Amsterdam

0 commit comments

Comments
 (0)