Development Setup
This page documents how to set up the development environment for contributing to this homelab documentation.
Getting Started
Prerequisites
- Python 3.8+: For running MkDocs
- Git: For version control
- Node.js (optional): For some pre-commit hooks
Initial Setup
- Clone the repository:
- Create a virtual environment:
- Install dependencies:
- Install development tools:
Development Workflow
Running the Documentation Locally
Start the development server:
The documentation will be available at http://localhost:8000 with hot reload enabled.
Any changes to markdown files will automatically refresh the browser.
Making Changes
- Create a new branch:
-
Make your changes: Edit markdown files in the
docs/directory -
Test locally: Verify changes look good with
mkdocs serve -
Run quality checks:
- Commit and push:
Building the Documentation
To build static files for deployment:
This creates a site/ directory with the built documentation.
File Structure
homelab/
├── docs/ # Documentation content
│ ├── index.md # Homepage
│ ├── infrastructure/ # Infrastructure documentation
│ ├── services/ # Service documentation
│ ├── guides/ # How-to guides
│ ├── troubleshooting/ # Problem solving
│ ├── reference/ # Quick reference
│ └── repository/ # This section
├── mkdocs.yml # MkDocs configuration
├── .pre-commit-config.yaml # Code quality automation
├── .markdownlint.json # Markdown linting rules
├── .gitignore # Git ignore patterns
└── README.md # Repository overview
Documentation Standards
Markdown Guidelines
- Use 120 characters maximum line length
- Use ATX-style headers (
# HeadernotHeader\n======) - Include descriptive alt text for images
- Use relative links for internal references
Content Organization
- Clear hierarchy: Use proper heading levels (H1 → H2 → H3)
- Consistent structure: Follow the established section patterns
- Cross-references: Link between related sections
- Code examples: Include practical, working examples
File Naming
- Use kebab-case for file names:
getting-started.md - Keep names descriptive but concise
- Use consistent naming within each section
Quality Assurance
Automated Checks
Every commit is automatically checked for:
- Markdown formatting consistency
- Spelling mistakes
- Trailing whitespace
- File formatting
Manual Review
Before submitting changes:
- Content is accurate and up-to-date
- Links work correctly
- Code examples are tested
- Screenshots are current (if applicable)
- Writing is clear and concise
Troubleshooting Development Issues
MkDocs Issues
Problem: mkdocs serve fails to start
Problem: Changes not reflecting in browser
# Solution: Hard refresh or restart server
# Ctrl+Shift+R (or Cmd+Shift+R on Mac)
# Or restart: Ctrl+C then mkdocs serve
Pre-commit Issues
Problem: Pre-commit hooks failing
Problem: Hook installation issues
Git Issues
Problem: Large file warnings
Contributing Guidelines
Content Contributions
- Stay on topic: Focus on homelab-related content
- Be practical: Include real examples and working code
- Be accurate: Test configurations before documenting
- Be helpful: Write for someone learning the topic
Style Guidelines
- Use active voice where possible
- Be concise but thorough
- Use consistent terminology throughout
- Include context for commands and configurations
Review Process
- Changes are reviewed for technical accuracy
- Writing style and clarity are evaluated
- Links and code examples are tested
- Integration with existing content is verified
Getting Help
Documentation Issues
- Check existing troubleshooting guides
- Review MkDocs documentation
- Look at Material theme docs
Technical Issues
- Check repository issues
- Review development tools documentation
- Consult the technologies overview
This documentation setup follows modern technical writing best practices and ensures consistent, high-quality documentation for the homelab project.