Skip to content

Commit 51ecaf8

Browse files
committed
Reshuffle README sections
1 parent 4262241 commit 51ecaf8

File tree

1 file changed

+35
-28
lines changed

1 file changed

+35
-28
lines changed

README.md

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,16 @@ mkdocs. The plugin uses [GitHub's GraphQL
55
API](https://docs.github.com/en/graphql) to fetch the list of contributors for
66
each page.
77

8+
For ease of use, this plugin is integrated in the [material for
9+
mkdocs](https://squidfunk.github.io/mkdocs-material/) theme by [Martin
10+
Donath](https://github.com/squidfunk). See [Mkdocs material
11+
documentation](https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#document-contributors).
12+
813
Other MkDocs plugins that use information to fetch authors:
914

1015
- [`mkdocs-git-authors-plugin`](https://github.com/timvink/mkdocs-git-authors-plugin) for displaying user names a number of lines contributed (uses local Git information)
1116
- [`mkdocs-git-committers-plugin`](https://github.com/byrnereese/mkdocs-git-committers-plugin) display contributors for a page (uses local Git information, completed with REST GitHub API v3)
1217

13-
## History
14-
15-
This is a fork from the original [`mkdocs-git-committers-plugin`](https://github.com/byrnereese/mkdocs-git-committers-plugin) by @byrnereese.
16-
17-
I had to create this fork so that it could be uploaded and distributed through PyPi. The package has been renamed to `mkdocs-git-committers-plugin-2`.
18-
19-
This "v2" differs from the original by:
20-
21-
- Fetch contributors directly from GitHub
22-
- Eliminate the need to match git commit logs with entries in GitHub, and thus GitHub API calls
23-
- No more risk of matching the incorrect contributor as the information comes directly from GitHub
24-
- last_commit_date is now populated with local git info
25-
- Use a cache file to speed up following builds: authors are fetched from GitHub for a page only if that page has changed since the last build
26-
27-
All of the above improves accuracy and performances.
28-
29-
Note: the plugin configuration in `mkdocs.yml` still uses the original `git-committers` sections.
30-
31-
## material for mkdocs theme
32-
33-
This plugin is integrated in the [material for mkdocs](https://squidfunk.github.io/mkdocs-material/) theme by [Martin Donath](https://github.com/squidfunk).
34-
35-
## Limitations
36-
37-
- Getting the contributors relies on what is available on GitHub. This means that for new files, the build will report no contributors (and informed you with a 404 error which can be ignored)
38-
When the file is merged, the contributors will be added normally.
39-
- For now, Git submodule is not supported and will report no contributors.
40-
4118
## Setup
4219

4320
Install the plugin using pip:
@@ -73,8 +50,38 @@ More information about plugins in the [MkDocs documentation][mkdocs-plugins].
7350
- `cache_dir` - The path which holds the authors cache file to speed up documentation builds. Defaults to `.cache/plugin/git-committers/`. The cache file is named `page-authors.json.json`.
7451
- `exclude` - Specify a list of page source paths (one per line) that should not have author(s) or last commit date included (excluded from processing by this plugin). Default is empty. [Example Usage](https://timvink.github.io/mkdocs-git-authors-plugin/options.html#exclude).
7552

53+
## History
54+
55+
This is a fork from the original [`mkdocs-git-committers-plugin`](https://github.com/byrnereese/mkdocs-git-committers-plugin) by @byrnereese.
56+
57+
I had to create this fork so that it could be uploaded and distributed through PyPi. The package has been renamed to `mkdocs-git-committers-plugin-2`.
58+
59+
This "v2" differs from the original by:
60+
61+
- Fetch contributors directly from GitHub
62+
- Eliminate the need to match git commit logs with entries in GitHub, and thus GitHub API calls
63+
- No more risk of matching the incorrect contributor as the information comes directly from GitHub
64+
- last_commit_date is now populated with local git info
65+
- Use a cache file to speed up following builds: authors are fetched from GitHub for a page only if that page has changed since the last build
66+
67+
All of the above improves accuracy and performances.
68+
69+
Note: the plugin configuration in `mkdocs.yml` still uses the original `git-committers` sections.
70+
71+
## Limitations
72+
73+
- Getting the contributors relies on what is available on GitHub. This means that for new files, the build will report no contributors (and informed you with a 404 error which can be ignored)
74+
When the file is merged, the contributors will be added normally.
75+
- For now, Git submodule is not supported and will report no contributors.
76+
7677
## Usage
7778

79+
You have 2 options to use this plugin:
80+
81+
1. Use Mkdocs material theme (see [Mkdocs material
82+
documentation](https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#document-contributors)).
83+
1. Use the plugin directly in your template. See below.
84+
7885
### Display Last Commit
7986

8087
In addition to displaying a list of committers for a file, you can also access

0 commit comments

Comments
 (0)