[![Actions Status](https://github.com/timvink/mkdocs-git-authors-plugin/workflows/pytest/badge.svg)](https://github.com/timvink/mkdocs-git-authors-plugin/actions)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-git-authors-plugin)
![PyPI](https://img.shields.io/pypi/v/mkdocs-git-authors-plugin)
![PyPI - Downloads](https://img.shields.io/pypi/dm/mkdocs-git-authors-plugin)
[![codecov](https://codecov.io/gh/timvink/mkdocs-git-authors-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/timvink/mkdocs-git-authors-plugin)
![GitHub contributors](https://img.shields.io/github/contributors/timvink/mkdocs-git-authors-plugin)
![PyPI - License](https://img.shields.io/pypi/l/mkdocs-git-authors-plugin)
# mkdocs-git-authors-plugin
Lightweight [MkDocs](https://www.mkdocs.org/) plugin to display git authors of a markdown page:
> Authors: Jane Doe, John Doe
See the [demo](https://timvink.github.io/mkdocs-git-authors-plugin/). The plugin only considers authors of the current lines in the page ('surviving code' using `git blame`).
Other MkDocs plugins that use information from git:
- [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) for displaying the last revision date
- [mkdocs-git-committers-plugin](https://github.com/byrnereese/mkdocs-git-committers-plugin) for displaying authors' github user profiles
## Setup
Install the plugin using pip3:
```bash
pip3 install mkdocs-git-authors-plugin
```
Next, add the following lines to your `mkdocs.yml`:
```yml
plugins:
- search
- git-authors
```
> If you have no `plugins` entry in your config file yet, you'll likely also want to add the `search` plugin. MkDocs enables it by default if there is no `plugins` entry set.
You can then use the `{{ git_page_authors }}` tag in your markdown document, or choose to customize your mkdocs theme (see [usage](https://timvink.github.io/mkdocs-git-authors-plugin/usage.html) page in the docs).
### Note when using build environments
This plugin needs access to the last commit that touched a specific file to be able to retrieve the date. By default many build environments only retrieve the last commit, which means you might need to:
<details>
<summary>Change your CI settings</summary>
- github actions: set `fetch_depth` to `0` ([docs](https://github.com/actions/checkout))
- gitlab runners: set `GIT_DEPTH` to `1000` ([docs](https://docs.gitlab.com/ee/user/project/pipelines/settings.html#git-shallow-clone))
- bitbucket pipelines: set `clone: depth: full` ([docs](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/))
</details>
## Documentation
See [timvink.github.io/mkdocs-git-authors-plugin](https://timvink.github.io/mkdocs-git-authors-plugin/)
## Contributing
Very much open to contributions! Please read [contributing guide](https://timvink.github.io/mkdocs-git-authors-plugin/contributing.html) before putting in any work.
Raw data
{
"_id": null,
"home_page": "https://github.com/timvink/mkdocs-git-authors-plugin",
"name": "mkdocs-git-authors-plugin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "mkdocs git contributors committers authors plugin",
"author": "Tim Vink",
"author_email": "vinktim@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/80/ef/09ab7178d580e342cb3ba279c48eaf3abf55795a2ae6e5426fe2c725143c/mkdocs_git_authors_plugin-0.9.2.tar.gz",
"platform": null,
"description": "[![Actions Status](https://github.com/timvink/mkdocs-git-authors-plugin/workflows/pytest/badge.svg)](https://github.com/timvink/mkdocs-git-authors-plugin/actions)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-git-authors-plugin)\n![PyPI](https://img.shields.io/pypi/v/mkdocs-git-authors-plugin)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/mkdocs-git-authors-plugin)\n[![codecov](https://codecov.io/gh/timvink/mkdocs-git-authors-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/timvink/mkdocs-git-authors-plugin)\n![GitHub contributors](https://img.shields.io/github/contributors/timvink/mkdocs-git-authors-plugin)\n![PyPI - License](https://img.shields.io/pypi/l/mkdocs-git-authors-plugin)\n\n# mkdocs-git-authors-plugin\n\nLightweight [MkDocs](https://www.mkdocs.org/) plugin to display git authors of a markdown page:\n\n> Authors: Jane Doe, John Doe\n\nSee the [demo](https://timvink.github.io/mkdocs-git-authors-plugin/). The plugin only considers authors of the current lines in the page ('surviving code' using `git blame`).\n\nOther MkDocs plugins that use information from git:\n\n- [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) for displaying the last revision date\n- [mkdocs-git-committers-plugin](https://github.com/byrnereese/mkdocs-git-committers-plugin) for displaying authors' github user profiles\n\n## Setup\n\nInstall the plugin using pip3:\n\n```bash\npip3 install mkdocs-git-authors-plugin\n```\n\nNext, add the following lines to your `mkdocs.yml`:\n\n```yml\nplugins:\n - search\n - git-authors\n```\n\n> If you have no `plugins` entry in your config file yet, you'll likely also want to add the `search` plugin. MkDocs enables it by default if there is no `plugins` entry set.\n\nYou can then use the `{{ git_page_authors }}` tag in your markdown document, or choose to customize your mkdocs theme (see [usage](https://timvink.github.io/mkdocs-git-authors-plugin/usage.html) page in the docs).\n\n### Note when using build environments\n\nThis plugin needs access to the last commit that touched a specific file to be able to retrieve the date. By default many build environments only retrieve the last commit, which means you might need to:\n<details>\n <summary>Change your CI settings</summary>\n \n - github actions: set `fetch_depth` to `0` ([docs](https://github.com/actions/checkout))\n - gitlab runners: set `GIT_DEPTH` to `1000` ([docs](https://docs.gitlab.com/ee/user/project/pipelines/settings.html#git-shallow-clone))\n - bitbucket pipelines: set `clone: depth: full` ([docs](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/))\n</details>\n\n\n## Documentation\n\nSee [timvink.github.io/mkdocs-git-authors-plugin](https://timvink.github.io/mkdocs-git-authors-plugin/)\n\n## Contributing\n\nVery much open to contributions! Please read [contributing guide](https://timvink.github.io/mkdocs-git-authors-plugin/contributing.html) before putting in any work.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Mkdocs plugin to display git authors of a page",
"version": "0.9.2",
"project_urls": {
"Homepage": "https://github.com/timvink/mkdocs-git-authors-plugin"
},
"split_keywords": [
"mkdocs",
"git",
"contributors",
"committers",
"authors",
"plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "480857d0fea1cc30096fcc94ec9cd4ccdee625be89fd710626f78d90fc13738e",
"md5": "0af9157c087578ff36525b98f0665e42",
"sha256": "f6cefc4dc832865d26f7f9f944c0a8c7dc852742d79320f3800e0d97814e2a84"
},
"downloads": -1,
"filename": "mkdocs_git_authors_plugin-0.9.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0af9157c087578ff36525b98f0665e42",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 20332,
"upload_time": "2024-11-04T13:57:11",
"upload_time_iso_8601": "2024-11-04T13:57:11.937691Z",
"url": "https://files.pythonhosted.org/packages/48/08/57d0fea1cc30096fcc94ec9cd4ccdee625be89fd710626f78d90fc13738e/mkdocs_git_authors_plugin-0.9.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "80ef09ab7178d580e342cb3ba279c48eaf3abf55795a2ae6e5426fe2c725143c",
"md5": "a2285fe1a4df8db116170284e62f75ab",
"sha256": "77f97c321e08a8757beb866293eb257070b11cd5a080976bc6696b249cbade4f"
},
"downloads": -1,
"filename": "mkdocs_git_authors_plugin-0.9.2.tar.gz",
"has_sig": false,
"md5_digest": "a2285fe1a4df8db116170284e62f75ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 21403,
"upload_time": "2024-11-04T13:57:13",
"upload_time_iso_8601": "2024-11-04T13:57:13.742883Z",
"url": "https://files.pythonhosted.org/packages/80/ef/09ab7178d580e342cb3ba279c48eaf3abf55795a2ae6e5426fe2c725143c/mkdocs_git_authors_plugin-0.9.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-04 13:57:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "timvink",
"github_project": "mkdocs-git-authors-plugin",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mkdocs-git-authors-plugin"
}