Contributing to Documentation¶
We welcome contributions to improve and expand this documentation! Whether you're fixing typos, clarifying instructions, adding new guides, or updating existing content, your help is appreciated.
How to Contribute¶
This documentation is hosted on GitHub Pages and built with MkDocs from Markdown files in the ld-decode-docs repository. All documentation source files are located in the docs/ directory.
If you don't have the time or knowledge to work with GitHub, but you spot an issue and still want to help, please use the GitHub issues located in the documentation GitHub repository - make sure you clearly link the page in question and state what's wrong.
Quick Start¶
Prerequisites¶
This project uses Nix to provide a reproducible development environment with all necessary dependencies, including MkDocs and its plugins. You have two options:
Option 1: Using Nix (Recommended)¶
If you have Nix installed with flakes enabled:
# Clone the repository
git clone https://github.com/happycube/ld-decode-docs.git
cd ld-decode-docs
# Enter the Nix development shell (this will install all dependencies)
nix develop
# Start the MkDocs development server
mkdocs serve
The documentation will be available at http://127.0.0.1:8000/
Option 2: Manual Installation¶
If you don't want to use Nix, install MkDocs and its dependencies manually:
Then run mkdocs serve to start the development server.
Development Workflow¶
1. Fork and Clone¶
-
Fork the repository: Visit https://github.com/happycube/ld-decode-docs and click the "Fork" button to create your own copy.
-
Clone your fork:
2. Set Up Development Environment¶
Enter the Nix development shell (if using Nix):
This provides: - MkDocs static site generator - Material for MkDocs theme - All required MkDocs plugins
3. Create a Branch¶
Use descriptive branch names like fix-installation-guide or add-vbi-documentation.
4. Make Changes¶
Edit the Markdown files in the docs/ directory:
docs/
├── index.md # Homepage
├── Installation/ # Installation guides
├── Tools/ # Tool documentation
├── How-to-guides/ # Tutorials and guides
├── Hardware/ # Hardware documentation
└── ...
Documentation Guidelines¶
- Format: All documentation is written in Markdown (
.mdfiles) - Links: Keep
.mdextensions in internal links - MkDocs handles them correctly - Navigation: Add new pages to the
navsection inmkdocs.yml - Images: Place images in the appropriate
assets/subdirectory - Code blocks: Use fenced code blocks with language identifiers for syntax highlighting
5. Preview Your Changes¶
Use MkDocs to preview your changes locally:
Visit http://127.0.0.1:8000/ to see your changes. The server automatically reloads when you save files.
Common MkDocs Commands¶
# Serve documentation with live reload
mkdocs serve
# Build static site (output in site/)
mkdocs build
# Build with strict mode (fails on warnings)
mkdocs build --strict
# Serve on different port
mkdocs serve -a localhost:8080
6. Test Your Changes¶
Before submitting, ensure:
- All links work correctly
- Images display properly
- Code blocks render with correct syntax highlighting
- Navigation structure is logical
- No build warnings:
mkdocs build --strict
7. Commit and Push¶
# Stage your changes
git add docs/
# Commit with descriptive message
git commit -m "Add documentation for ld-analyse audio visualization"
# Push to your fork
git push origin your-feature-branch
Commit Message Guidelines¶
- Use clear, descriptive commit messages
- Start with a verb (Add, Fix, Update, Remove, etc.)
- Reference issues when applicable: "Fix #123: Correct installation steps"
8. Submit Pull Request¶
- Go to your fork on GitHub
- Click "New Pull Request"
- Select your branch
- Provide a clear description of your changes
- Submit for review
PRs are automatically deployed to GitHub Pages once merged.
Project Structure¶
MkDocs Configuration¶
The mkdocs.yml file controls the site configuration:
site_name: ld-decode Documentation
theme:
name: material
nav:
- Home: index.md
- Installation: Installation/Installation.md
# ... more navigation items
Key sections:
- site_name: Site title
- theme: Theme configuration (Material theme)
- nav: Navigation structure (table of contents)
- markdown_extensions: Enabled Markdown features
- plugins: MkDocs plugins
Adding New Pages¶
- Create a new
.mdfile in the appropriatedocs/subdirectory - Write your documentation
- Add the page to
mkdocs.ymlundernav:
Using Nix Flakes¶
This project uses Nix flakes for reproducible builds. The flake.nix defines:
- Development shell with MkDocs and dependencies
- Consistent environment across all contributors
- Automatic dependency management
To update dependencies, modify flake.nix and run:
Markdown Formatting¶
This documentation uses Markdown for formatting. Markdown is a lightweight markup language that's easy to read and write.
Useful Resources¶
- Markdown Guide - Comprehensive guide to Markdown syntax
- GitHub Flavored Markdown - GitHub's extended Markdown specification
- MkDocs Documentation - MkDocs static site generator
- Material for MkDocs - Theme documentation
Style Guide¶
Markdown Conventions¶
- Use ATX-style headers (
#,##,###) - Use fenced code blocks with language identifiers
- Use relative links for internal documentation
- Include alt text for images
Writing Style¶
- Write in clear, concise language
- Use active voice
- Include examples where helpful
- Break complex topics into sections
- Use numbered lists for sequential steps
- Use bulleted lists for non-sequential items
Questions or Issues?¶
If you have questions about contributing or encounter any issues, feel free to:
- Open an issue on the GitHub repository
- Join our community on Discord or IRC to discuss documentation improvements
Thank you for helping make this documentation better!