Contributing to the Documentation
We welcome contributions to improve the Kube-Hetzner documentation! This guide will help you get started with contributing to the docs.
Documentation Structure
The documentation is built using Docusaurus and is located in the docs/
directory. The main documentation files are in Markdown format with frontmatter for metadata.
Auto-Generated Documentation
Important Note for Contributors: The main variables reference page (docs/configuration/terraform.md
) is automatically generated from the Terraform module's code comments using terraform-docs
. Do not edit this file manually, as your changes will be overwritten during the next documentation build.
If you need to update variable descriptions or add new variables:
- Update the comments in the Terraform module's
variables.tf
file - Run
terraform-docs
to regenerate the documentation - Commit both the source code changes and the regenerated documentation
Making Changes
For New Documentation
- Create a new Markdown file in the appropriate directory under
docs/
- Add the required frontmatter:
frontmatter.yaml
---
sidebar_position: X
--- - Write your content using Markdown
- Update
sidebars.ts
to include the new page in the navigation
For Existing Documentation
- Locate the relevant Markdown file in
docs/
- Make your changes
- Ensure the content follows the established style and structure
Style Guidelines
- Use clear, concise language
- Include code examples where appropriate
- Use proper heading hierarchy (H1 for title, H2 for sections, etc.)
- Include cross-references to related documentation
- Test all code examples for accuracy
Testing Your Changes
To preview your documentation changes locally:
- Navigate to the
docu/
directory - Install dependencies:
npm install
- Start the development server:
npm start
- Open
http://localhost:3000
in your browser
Submitting Changes
- Create a pull request with your changes
- Ensure all new pages are properly linked in the sidebar
- Verify that the documentation builds successfully
- Request review from maintainers
Areas for Contribution
- New Features: Document newly added features and configuration options
- Examples: Add practical examples and use cases
- Troubleshooting: Expand troubleshooting guides
- Best Practices: Share best practices and recommendations
- Tutorials: Create step-by-step guides for common tasks
Thank you for helping improve the Kube-Hetzner documentation!