Skip to content

Commit 0a85b67

Browse files
committed
Only show contribution for multiple authors
When there is only one author for the page it is redundant and actually annoying to read '(100.00%)'.
1 parent 89ea58e commit 0a85b67

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mkdocs_git_authors_plugin/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ def summarize(authors, config):
9696
def format_author(author):
9797
contrib = (
9898
' (%s)' % author['contribution']
99-
if config['show_contribution']
99+
if (
100+
config['show_contribution']
101+
and len(authors) > 1
102+
)
100103
else ''
101104
)
102105
return "<a href='mailto:%s'>%s</a>%s" % (

0 commit comments

Comments
 (0)