From dc5e2bac0e55e080323347489f49ef7ad3fccf68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 1 Dec 2026 14:26:12 +0100 Subject: [PATCH] docs: document git-authors plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timothée Mazzucotelli --- docs/compatibility/mkdocs/plugins.md | 46 +++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/docs/compatibility/mkdocs/plugins.md b/docs/compatibility/mkdocs/plugins.md index 816ddf7..9eae41e 100644 --- a/docs/compatibility/mkdocs/plugins.md +++ b/docs/compatibility/mkdocs/plugins.md @@ -383,6 +383,50 @@ For more information, see [plugin documentation][gh-admonitions]. --- +### `git-authors` + +_Since [0.1.4]_ + +Page and site authors are listed from surviving source lines with `git blame`. + +In Markdown, HTML summaries are inserted with `{{ git_page_authors }}` and `{{ git_site_authors }}`. The same summaries and structured `git_info` data are also provided as template variables. + +
+ +| Setting | Default | Description | +| ------- | ------- | ----------- | +| `enabled` | `true` | Whether Git authorship is added to pages. | +| `enabled_on_serve` | `true` | Whether authorship is processed during `zensical serve`. | +| `show_contribution` | `false` | Whether contribution percentages are shown; page percentages are omitted for a single author. | +| `show_line_count` | `false` | Whether line counts are shown in the site-author summary. | +| `show_email_address` | `true` | Whether author names are linked with the configured `href`. | +| `href` | `mailto:{email}` | Author link format, with `{email}` and `{name}` fields. | +| `add_co_authors` | `false` | Whether commit co-authors are included. | +| `count_empty_lines` | `true` | Whether empty source lines are counted toward contributions. | +| `sort_authors_by` | `name` | Sort order: `name` or descending `contribution`; contribution or line-count displays also select contribution order. | +| `authorship_threshold_percent` | `0` | Percentage above which page authors are retained; `0` disables filtering and single authors are always retained. | +| `ignore_authors` | `[]` | Email addresses excluded from contribution counts. | +| `ignore_commits` | `""` | File containing commits ignored by blame, relative to the configuration directory. | +| `exclude` | `[]` | Source paths or glob patterns excluded from authorship processing, relative to `docs_dir`. | +| `fallback_to_empty` | `false` | Whether missing repositories or Git are replaced with empty summaries. | +| `strict` | `true` | Fallback diagnostics are emitted as warnings; with `false`, informational messages are used. | + +
+ +**Differences**: + +- **Author links:** Only `{email}` and `{name}` fields and escaped braces are supported in `href`. Format specifications and conversions are rejected. Rendered author names and link attributes are HTML-escaped. +- **Sorting:** Contribution sorting is always descending for page and site authors, including when `sort_authors_by: contribution` is set without contribution displays. +- **Co-authors:** Mailmap identities are also applied to co-authors. Repeated co-author trailers and aliases of the commit author are counted once. +- **Exclusion patterns:** Glob matching is performed with [glob patterns], as in [`exclude`](#exclude). Invalid patterns are rejected. +- **Source repositories:** Each physical source's repository is used, including linked worktrees and sources reached through symlinks. Generated pages are given empty page-author lists; site-author summaries remain available. +- **Shallow clones:** Available history is used with a warning, and authorship may be incomplete. Full history must be fetched through the checkout configuration. +- **Preview:** Git state is refreshed on the next content rebuild during `zensical serve`; Git metadata is not watched separately. + +For more information, see the [plugin documentation][git-authors]. + +--- + ### `git-revision-date-localized` _Since [0.1.3]_ @@ -1183,7 +1227,6 @@ do not imply release dates. ### Planned -- [ ] [`git-authors`][git-authors] - [ ] [`git-committers`][git-committers] _Review our public [backlog] for additional plugins we may support later._ @@ -1216,6 +1259,7 @@ without using their original codebases. [0.0.74]: https://github.com/zensical/zensical/releases/tag/v0.0.74 [0.1.1]: https://github.com/zensical/zensical/releases/tag/v0.1.1 [0.1.3]: https://github.com/zensical/zensical/releases/tag/v0.1.3 +[0.1.4]: https://github.com/zensical/zensical/releases/tag/v0.1.4 [Additional JavaScript]: ../../customization.md#additional-javascript [api-autonav]: https://github.com/tlambert03/mkdocs-api-autonav#configuration [audio]: https://github.com/jfcmontmorency/mkdocs-audio