Guide to contributing to this project.
Thank you for your interest in contributing to the Redpanda documentation tools! This project includes Antora extensions, AsciiDoc macros, and an MCP server that helps automate documentation tasks.
Choose the guide for the component you want to work on:
- Antora extensions development
-
How to create and modify Antora extensions
-
Extension architecture and lifecycle
-
Creating new extensions
-
Common patterns and APIs
-
Testing and debugging
-
- AsciiDoc macros development
-
How to create and modify AsciiDoc macros
-
Inline and block macro types
-
Macro processing and HTML generation
-
Asciidoctor.js extension API
-
Testing and debugging
-
- MCP server development
-
How to work on the MCP server
-
Server architecture and tools
-
Adding new tools and prompts
-
Testing guidelines
-
Security and best practices
-
Verify installations:
git --version
node --version
npm --versionClone the repository:
git clone https://github.com/redpanda-data/docs-extensions-and-macros
cd docs-extensions-and-macrosgit checkout -b feature/my-new-featureUse descriptive branch names:
* feature/add-new-extension
* fix/glossary-macro-bug
* docs/update-user-guide
Follow the relevant development guide: * Extensions - For Antora extensions * Macros - For AsciiDoc macros * MCP - For MCP server tools
Test with a local Antora build:
# Point to your local development version
npx antora local-antora-playbook.ymlFor extensions and macros, update your playbook:
antora:
extensions:
- '/absolute/path/to/docs-extensions-and-macros/extensions/my-extension.js'
asciidoc:
extensions:
- '/absolute/path/to/docs-extensions-and-macros/macros/my-macro.js'For MCP server:
npx doc-tools setup-mcp
# Restart Claude CodeAdd tests for new functionality:
// For extensions
__tests__/extensions/my-extension.test.js
// For macros
__tests__/macros/my-macro.test.js
// For MCP
__tests__/mcp/integration.test.jsRun tests:
npm testUpdate relevant documentation:
-
Extension/macro reference documentation
-
User guides if behavior changed
-
README files if new features added
Write clear commit messages:
git add .
git commit -m "Add new glossary tooltip feature
- Implement data-tooltip attribute support
- Add tests for tooltip rendering
- Update user guide with tooltip examples"-
Use 2 spaces for indentation
-
Use semicolons
-
Use single quotes for strings
-
Use
constandlet, avoidvar -
Add JSDoc comments for functions
-
Use kebab-case for files:
my-extension.js -
Use descriptive names:
generate-index-data.jsnotgen.js
-
Catch and log errors, don’t let builds fail silently
-
Provide helpful error messages
-
Use the logger when available
-
Use AsciiDoc for all documentation
-
Use sentence case for headings (except main title)
-
Keep documentation in sync with code
-
Provide examples for new features
-
Link between related documentation
-
❏ Tests pass (
npm test) -
❏ Documentation updated
-
❏ Commit messages are clear
-
❏ Branch is up to date with main
Include:
-
What: Summary of changes
-
Why: Reason for changes
-
How: Implementation approach
-
Testing: How you tested the changes
-
Breaking changes: If any, clearly noted
All contributions must include tests:
-
Unit tests - Test individual functions/components
-
Integration tests - Test components working together
-
Manual testing - Test in real Antora builds
Run the full test suite before submitting:
npm test-
Be respectful and inclusive
-
Provide constructive feedback
-
Focus on the code, not the person
-
Help newcomers get started
-
Questions: Open a discussion on GitHub
-
Bugs: Open an issue with reproduction steps
-
Features: Open an issue with use case description
-
Chat: Join the Redpanda Community Slack