Skip to content

Add support for mkdocs-git-authors-plugin #1403

@timvink

Description

@timvink

Description

Add support for mkdocs-git-authors-plugin to display the authors on the bottom of a page.

Disclaimer: I'm the author of the plugin. Also note the original idea is from mkdocs-git-committers-plugin but that plugin is only for github. The author and I discussed integration but decided to split into separate plugin (see byrnereese/mkdocs-git-committers-plugin#9)

Use Cases

When enabled, each markdown page will display the name of the committers (as specified in their .gitconfig). It uses git blame so only considers

Screenshots / Mockups

image

Implementation can be done by updating base.html just below the page.meta.git_revision_date block:

{% if git_authors_summary %}
<small>
    Written by: {{ git_authors_summary }}
</small>
{% endif %}

We can localize the "Written by" by adding a new language item, f.e. source.revision.date.

If this fits with mkdocs-material I'd be happy to work on a PR ! Todo:

  • Add translations
  • Update base
  • Add CSS similar to .md-source-date
  • Add page to docs website
  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions