Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ojacques authored Feb 24, 2024
2 parents d26cdd8 + 932c4d8 commit f961a0a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,28 @@ unless you access private repositories.
## Config

- `enabled` - Disables plugin if set to `False` for e.g. local builds (default: `True`)
- `repository` - For GitHub, the name of the repository, e.g. 'ojacques/mkdocs-git-committers-plugin-2'
- `repository` - For GitHub, the name of the repository, e.g.
'ojacques/mkdocs-git-committers-plugin-2'
- `gitlab_repository` - For GitLab, the project ID, e.g. '12345678'
- `branch` - The name of the branch to get contributors from. Example: 'master' (default)
- `token` - A GitHub or GitLab personal access token for REST API calls. The token does not need any scope: uncheck everything when creating the GitHub Token at [github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new), unless you access private repositories. For GitLab, create a token at [gitlab.com/-/profile/personal_access_tokens](https://gitlab.com/-/profile/personal_access_tokens).
- `branch` - The name of the branch to get contributors from. Example: 'master'
(default)
- `token` - A GitHub or GitLab personal access token for REST API calls. The
token does not need any scope: uncheck everything when creating the GitHub
Token at
[github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new),
unless you access private repositories. For GitLab, create a token at
[gitlab.com/-/profile/personal_access_tokens](https://gitlab.com/-/profile/personal_access_tokens).
- `enterprise_hostname` - For GitHub enterprise: the GitHub enterprise hostname.
- `gitlab_hostname` - For GitLab: the GitLab hostname if different from gitlab.com (self-hosted).
- `api_version` - For GithHub Enterprise: The version part that needs to be appended to the URL. E.g. `/v3`
- `gitlab_hostname` - For GitLab: the GitLab hostname if different from
gitlab.com (self-hosted).
- `api_version` - For GitHub Enterprise: The version part that needs to be appended to the URL. E.g. `/v3`
- `docs_path` - the path to the documentation folder. Defaults to `docs`.
- `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`.
- `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. Examples:
- `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`.
- `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. Examples:

```
# mkdocs.yml
Expand Down Expand Up @@ -99,8 +111,7 @@ Note: the plugin configuration in `mkdocs.yml` still uses the original `git-comm

## Limitations

- 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)
When the file is merged, the contributors will be added normally.
- Getting the contributors relies on what is available on GitHub or GitLab.
- For now, Git submodule is not supported and will report no contributors.

## Usage
Expand Down Expand Up @@ -208,3 +219,10 @@ Thank you to the following contributors:
- Nathan Hernandez
- Chris Northwood
- Martin Donath
- PTKay
- Guts
- Fir121
- dstockhammer
- thor
- n2N8Z
- barreeeiroo
2 changes: 1 addition & 1 deletion mkdocs_git_committers_plugin_2/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def on_page_context(self, context, page, config, nav):
if not self.enabled:
return context
if exclude(page.file.src_path, self.excluded_pages):
LOG.warning("git-committers: " + page.file.src_path + " is excluded")
LOG.info("git-committers: " + page.file.src_path + " is excluded")
return context
start = timer()
git_path = self.config['docs_path'] + page.file.src_path
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="mkdocs-git-committers-plugin-2",
version="2.2.3",
version="2.3.0",
description="An MkDocs plugin to create a list of contributors on the page. The git-committers plugin will seed the template context with a list of GitHub or GitLab committers and other useful GIT info such as last modified date",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit f961a0a

Please sign in to comment.