This library provides Antora extensions, AsciiDoc macros, and automation tools for Redpanda documentation.
Install the package:
npm i @redpanda-data/docs-extensions-and-macrosantora:
extensions:
- '@redpanda-data/docs-extensions-and-macros/extensions/version-fetcher/set-latest-version'
asciidoc:
extensions:
- '@redpanda-data/docs-extensions-and-macros/macros/glossary'- Antora extensions
-
Extensions that enhance the Antora build process
- AsciiDoc macros
-
Custom inline and block macros for documentation
- MCP server
-
Model Context Protocol server for automating documentation tasks with Claude Code
- CLI reference
-
Complete command reference for
doc-tools - Contributing
-
Development setup and guidelines
Extensions that enhance Antora’s build process:
-
Version management - Automatically fetch latest versions from GitHub
-
Content generation - Generate indexes, categories, and structured data
-
Navigation - Manage unlisted pages, redirects, and cross-version links
-
Integrations - Algolia indexing, EOL banners, related content
-
File processing - Archive attachments, replace attributes, collect samples
Inline and block macros for documentation:
-
glossterm- Reference glossary terms with tooltips -
config_ref- Link to configuration properties -
helm_ref- Link to Helm values -
components_by_category- Display Redpanda Connect components -
component_table- Searchable, filterable catalog of component cards
A Model Context Protocol server that exposes doc-tools to Claude Code:
-
Generate property, metrics, and RPK documentation
-
Update connector reference documentation
-
Get version information
-
Review generated content for quality
doc-tools check-sources checks the // Source: comments that record where a claim on a page came from. Put the comment directly above the claim, and name the symbol the value belongs to and the value itself:
// source: streaming-enterprise:src/v/config/configuration.cc#log_retention_ms "7 * 24h"
The default retention time is seven days.A citation without @<git-ref> is version-aware: it is checked at the release the page’s component version documents, resolved the way the docs build resolves the version attributes (extensions/version-fetcher/set-latest-version.js). streaming-enterprise resolves to latest-redpanda-tag (the newest GA release for the latest component version, the antora.yml value on a v/* branch, and redpanda-beta-tag, the newest RC, for a prerelease), console to latest-console-tag, operator-enterprise (or its old name, redpanda-operator) to latest-operator-version (an older line gets its own newest release), and connect to latest-connect-tag. Other repos, such as cloudv2, are checked on the default branch and reported as unversioned. So the same comment checks against the current GA tag on main and against v26.1 on v/26.1. Pin a ref, streaming-enterprise@v25.3.18:…#symbol "value", only for a fact deliberately about one release. The symbol must appear in the file as a whole identifier, and the quoted value within 30 lines of it, so the citation survives code moving around and fails only when the value changes.
The marker is case-insensitive, so // source: works too, and a parenthesized aside before the colon is allowed, for example // Source (verified 2026-10-20):. After the marker comes a ref, an optional quote in double quotes, and nothing else. A ref is one of:
-
[redpanda-data/]<repo>[@<git-ref>]:<path>#<symbol> "<value>": the symbol must appear in the file and the value within 30 lines of it. The value is required. -
redpanda-data/<repo>[@<git-ref>]:<path>:<line>[-<line>]: the fallback for a fact no symbol names. The cited lines must exist, and the optional quote in double quotes must appear in them (whitespace is normalized). Without@<git-ref>, it is version-aware in the same way. -
redpanda-data/<repo>#<number>: the pull request or issue must exist. Its state is reported. -
An uppercase Jira key, such as
DOC-1234, or anhttps://URL: syntax only. Add--check-urlsto HEAD-check URLs.
When the text after the marker does not start with a ref, the comment is free-form provenance prose. It is reported as an unchecked-note (info), counted, and never fails the run. An https:// URL or a Jira-style key followed by prose, such as KIP-848 consumer group protocol, is also a note. Prefer a ref: only refs are verified. A comment that starts with a ref but has other text after it is malformed, so put prose on its own comment line.
Malformed comments, missing files, line ranges past the end of the file, and quotes that are no longer in the cited lines are errors and exit 1. When a quote has moved, the message says where it is now. A repository that does not exist is an error when the token is a classic token with the repo scope. For any other token, such as a fine-grained token or a GitHub App token limited to selected repositories, a 404 could be a private repo outside that set, so it is a warning. A fetch that fails for auth, rate-limit, timeout, or network reasons is a warning, never a silent pass. A --files glob that matches no page exits 2, so a mistyped pattern can’t pass by checking nothing. The summary line counts the comments checked, the comments that failed, and the unchecked notes. Run npx doc-tools check-sources --diff origin/main to check only the pages changed on a branch. See CLI reference.
Report issues at https://github.com/redpanda-data/docs-extensions-and-macros/issues