Contributing to JAF Documentation¶
This guide explains how to contribute to the JAF documentation and work with MkDocs.
Prerequisites¶
- Python 3.x installed
- pip (Python package manager)
- Git
Setting Up Your Environment¶
-
Clone the repository:
-
Install documentation dependencies:
Running the Documentation Locally¶
Quick Start¶
Use the provided script:
Manual Start¶
Or run MkDocs directly:
Visit http://127.0.0.1:8000
to see the documentation site. It will automatically reload when you make changes.
Documentation Structure¶
docs/
├── README.md # Home page
├── getting-started.md # Getting started guide
├── core-concepts.md # Core concepts
├── adk-layer.md # ADK Layer documentation
├── a2a-protocol.md # A2A Protocol documentation
├── api-reference.md # API reference
├── visualization.md # Visualization guide
└── ... # Other documentation files
Writing Documentation¶
Markdown Guidelines¶
- Use clear headings: Start with
#
for main title,##
for sections - Code blocks: Use triple backticks with language identifier
- Links: Use relative links for internal documentation
- Admonitions: Use MkDocs Material admonitions for notes and warnings
Admonition Examples¶
!!! note
This is a note admonition.
!!! warning
This is a warning admonition.
!!! tip
This is a tip admonition.
!!! example
This is an example admonition.
Code Block Examples¶
```typescript
// TypeScript code with syntax highlighting
const agent = createAgent({
name: 'my-agent',
model: 'gpt-4',
tools: []
});
```
Adding New Pages¶
- Create a new
.md
file in thedocs/
directory - Add the page to the navigation in
mkdocs.yml
:
Building for Production¶
To build the static site:
This creates a site/
directory with the static HTML files.
Deploying Documentation¶
Documentation is automatically deployed to GitHub Pages when changes are pushed to the main
branch. The GitHub Actions workflow handles:
- Building the documentation
- Running validation checks
- Deploying to GitHub Pages
Best Practices¶
- Keep it Simple: Write for clarity and understanding
- Use Examples: Include practical code examples
- Stay Consistent: Follow existing documentation patterns
- Test Locally: Always preview changes before committing
- Update Navigation: Add new pages to
mkdocs.yml
- Check Links: Ensure all internal links work
MkDocs Features¶
Search¶
The documentation includes full-text search. Users can press /
to focus the search bar.
Dark Mode¶
Users can toggle between light and dark themes using the sun/moon icon.
Code Copy¶
Code blocks include a copy button for easy copying.
Table of Contents¶
Each page has an automatic table of contents on the right side.
Troubleshooting¶
Common Issues¶
- MkDocs not found: Install dependencies with
pip install -r requirements.txt
- Port already in use: Kill the process using port 8000 or use
mkdocs serve -a localhost:8001
- Build errors: Check for invalid YAML in
mkdocs.yml
or broken markdown syntax
Getting Help¶
- Check the MkDocs documentation
- Review Material for MkDocs
- Open an issue in the JAF repository