mkdocs-macros-adr-summary
This is a macro plugin to generates summaries from a list of a ADR documents in a directory.
The single ADR documents file names have to respect this format: 0000-my-decision-title.md
- start with 4 digits followed by the character
- - the rest of the file name can contain only letters, numbers, dashes and underscores (
[A-Za-z0-9_-]regex) - end with the
.mdextension
Examples and documentation can be found here
The package should be stable enough for daily use. I'll release 1.0.0, and switch to semantic version, as soon as support for MADR version 2 has been implemented. Until that breaking changes can be introduced and will be documented in the GitHub release description.
Quick start
Enable the plugin in mkdocs.yml
plugins:
- macros:
modules:
- mkdocs_macros_adr_summary
Create a markdown page in your mkdocs website and use the adr_summary macro providing
the path containing your ADR files relative to the mkdocs.yml file.
{{ adr_summary(adr_path="docs/adr", adr_style="nygard") }}
adr_style can be nygard, MADR2, MADR3, or MADR4
More customization
The page output is generated using a jinja template, but you can provide a custom one. The file path
must still be relative to the mkdocs.yml file.
{{ adr_summary(adr_path="docs/adr", adr_style="MADR3",m) }}
The default template is:
| ID | Date | Decision | Status |
|----|------|----------|--------|
{% for d in documents %}| {{ d.document_id }} | {{ d.date.strftime('%d-%m-%Y') if d.date else "-"}} | [{{ d.title }}]({{ d.file_path }}) | {{ d.status }} |
{% endfor %}
The documents variable in the jinja template is a Sequence of ADRDocument models:
@dataclass
class ADRDocument:
file_path: str
document_id: Optional[int] = None
title: Optional[str] = None
date: Optional[date] = None
status: Optional[str] = None
statuses: Sequence[str] = tuple()
deciders: Optional[str] = None
consulted: Optional[str] = None
informed: Optional[str] = None
There are some differences in what metadata is available when using different formats:
| Nygard | MADR4 | MADR3 | MADR2 | |
|---|---|---|---|---|
| file_path | ✅︎ | ✅︎ | ✅︎ | ✅︎ |
| title | ✅︎ | ✅︎ | ✅︎ | ✅︎ |
| date | ✅︎ | ✅︎ | ✅︎ | ✅︎ |
| status | ⚠ | ✅︎ | ✅︎ | ✅︎ |
| statuses | ✅︎ | ⚠ | ⚠ | ⚠ |
| deciders | ❌ | ✅︎ | ✅︎ | ✅︎ |
| consulted | ❌ | ✅︎ | ✅︎ | ❌ |
| informed | ❌ | ✅︎ | ✅︎ | ❌ |
- Nygard format
statusis the last itemstatuses. (I don't believe we should use multiple statuses, howeveradr-toolsallows it)deciders,consultedandinformedare not supported by the format
- MADR2, MADR3, and MADR4
- I wasn't able to find an automated tool supporting superseding documents.
By looking at the template it looks like there's a single status.
statuseswill return a list with a single status. - MADR4 uses
decision-makersinstead ofdecidersin the YAML frontmatter, but the parser maps it to thedecidersfield in the document model
- I wasn't able to find an automated tool supporting superseding documents.
By looking at the template it looks like there's a single status.
Supported ADR formats
The supported ADR formats are:
nygardformat, it is recommended to use adr-tools to manage the directoryMADRversion 4MADRversion 3MADRversion 2
Commands for development
All the common commands used during development can be run using make targets:
make dev-dependencies: Install dev requirementsmake test: Run test suitemake check: Run tests, code style and lint checksmake fix: Run code style and lint automatic fixes (where possible)make docs: Render the mkdocs website locally
Metadata
Release files for mkdocs-macros-adr-summary 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocs_macros_adr_summary-1.3.0.tar.gz | 10.9 kB | With provenance | Details for mkdocs_macros_adr_summary-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_macros_adr_summary-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_macros_adr_summary-1.3.0-py3-none-any.whl |
Total release size: 32.6 kB
Release files / mkdocs_macros_adr_summary-1.3.0.tar.gz
| Download URL | mkdocs_macros_adr_summary-1.3.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfcd4143cbad3ad9a3a008237365dd95b2734a9c27ca84a006d0dcb476421d1a
|
|
BLAKE2b-256 checksum How to use checksums |
9577fe7985452ecb26ed5898310ead5cf910d930e175b90dc285ba44b3ab3d21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2025.
Transparency logRelease files / mkdocs_macros_adr_summary-1.3.0-py3-none-any.whl
| Download URL | mkdocs_macros_adr_summary-1.3.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d054860242e80da91009c882133e72d18a251e45af64239ecdfdeb267f216d3
|
|
BLAKE2b-256 checksum How to use checksums |
a0c0b3d6d64ea7e40b10a02f659ba32fcb25c722ff705624e576556b2625a1b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2025.
Transparency logSecurity for mkdocs-macros-adr-summary 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mkdocs_macros_adr_summary-1.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.