Contributing to Documentation¶
Thank you for your interest in improving DataKit documentation! This guide explains how to contribute.
Quick Start¶
-
Clone the repository
-
Install dependencies
-
Start local preview
Open http://127.0.0.1:8000 in your browser. -
Make your changes in the
docs/folder -
Submit a pull request
Documentation Structure¶
docs/
├── index.md # Homepage
├── getting-started/ # Onboarding content
│ ├── prerequisites.md
│ ├── installation.md
│ └── quickstart.md
├── concepts/ # Conceptual guides
│ ├── overview.md
│ ├── data-packages.md
│ └── ...
├── tutorials/ # Step-by-step tutorials
│ ├── kafka-to-s3.md
│ └── ...
├── reference/ # Reference documentation
│ ├── cli.md
│ └── ...
├── troubleshooting/ # Help content
│ ├── common-issues.md
│ └── faq.md
└── stylesheets/ # Custom CSS
└── extra.css
Writing Guidelines¶
Voice and Tone¶
- Be direct: Use active voice, imperative mood for instructions
- Be helpful: Anticipate questions, provide context
- Be concise: Favor short sentences and paragraphs
- Be consistent: Follow established patterns
Good Examples¶
| ❌ Don't | ✅ Do |
|---|---|
| "It should be noted that..." | "Note:" |
| "In order to..." | "To..." |
| "You will need to run..." | "Run..." |
| "The command is executed by typing..." | "Run this command:" |
Page Structure¶
Every documentation page should have:
- YAML frontmatter with title and description
- Introduction explaining what the page covers
- Content organized with clear headings
- Next steps linking to related content
---
title: Page Title
description: Brief description for SEO
---
# Page Title
Introduction paragraph explaining what readers will learn.
## Section 1
Content...
## Section 2
Content...
## Next Steps
- [Related Page](../path/to/page.md)
Content Types¶
Getting Started¶
For onboarding new users:
- Focus on getting to "hello world" quickly
- Assume minimal prior knowledge
- Include all prerequisites
- Test instructions on a fresh environment
Concepts¶
For explaining ideas:
- Start with "what" and "why"
- Use diagrams and examples
- Link to related concepts
- Avoid implementation details
Tutorials¶
For teaching skills:
- One clear learning objective per tutorial
- Step-by-step with numbered steps
- Show expected output at each step
- Include complete, runnable examples
- Test the full tutorial end-to-end
Reference¶
For looking up details:
- Organized for quick scanning (tables, lists)
- Complete and precise
- Every option/flag documented
- Examples for common use cases
Troubleshooting¶
For solving problems:
- Symptom → Cause → Solution format
- Cover common issues first
- Include exact error messages
- Provide copy-paste solutions
Formatting¶
Headings¶
Code Blocks¶
Use fenced code blocks with language hints:
```bash
dk init my-pipeline
```
```yaml title="dk.yaml"
apiVersion: datakit.infoblox.dev/v1alpha1
kind: Transform
```
```python title="src/main.py"
def process():
pass
```
Admonitions¶
Use admonitions for callouts:
!!! note
Additional information.
!!! tip
Helpful suggestion.
!!! warning
Important caution.
!!! danger
Critical warning.
Tables¶
Links¶
# Internal links
[Installation](../getting-started/installation.md)
# External links
[OpenLineage](https://openlineage.io/)
# Anchor links
[See CLI Reference](#cli-reference)
Testing Changes¶
Local Preview¶
Validate Links¶
This fails on broken links.
Check Spelling¶
We recommend using a spell checker. Common technical terms are in the project dictionary.
Submitting Changes¶
Pull Request Process¶
- Create a branch:
git checkout -b docs/my-improvement - Make changes
- Test locally:
mkdocs serve - Validate:
mkdocs build --strict - Commit with descriptive message
- Push and open PR
PR Checklist¶
- Changes preview correctly locally
-
mkdocs build --strictpasses - New pages added to
mkdocs.ymlnav - Links work correctly
- Code examples are tested
- Follows style guidelines
Review Process¶
- Automated checks run on PR
- Documentation team reviews
- Feedback addressed
- Merged to main
- Auto-deployed to GitHub Pages
Style Reference¶
Command Examples¶
Show the command, then the output:
File Examples¶
Use title to show filename:
Placeholders¶
Use angle brackets for placeholders:
Variables¶
Use $VARIABLE for environment variables:
Getting Help¶
- Questions: Open an issue with the
docslabel - Ideas: Open an issue describing the improvement
- Discussion: Use GitHub Discussions
Thank you for contributing!