|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thank you for your interest in improving the Luma P1 community docs! |
| 4 | + |
| 5 | +!!! info "About These Docs" |
| 6 | + This documentation is an **unofficial, community-maintained** resource by |
| 7 | + [FRC Team 5892](https://github.com/FRC5892). It is **not affiliated with Luma**. |
| 8 | + For the official docs, visit [docs.luma.vision/p1](https://docs.luma.vision/p1/). |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## How to Contribute |
| 13 | + |
| 14 | +Contributions of all kinds are welcome: |
| 15 | + |
| 16 | +- **Fixing typos or factual errors** — Always appreciated! |
| 17 | +- **Improving existing guides** — Clearer steps, better tips, more screenshots |
| 18 | +- **Adding new guides** — Troubleshooting, advanced configuration, WPILib integration |
| 19 | +- **Updating outdated content** — As PhotonVision and Luma firmware evolve |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Getting Started |
| 24 | + |
| 25 | +### 1. Fork and Clone the Repository |
| 26 | + |
| 27 | +```bash |
| 28 | +# Fork the repo on GitHub, then: |
| 29 | +git clone https://github.com/<your-username>/Luma-Docs.git |
| 30 | +cd Luma-Docs |
| 31 | +``` |
| 32 | + |
| 33 | +### 2. Install Dependencies |
| 34 | + |
| 35 | +```bash |
| 36 | +pip install -r requirements.txt |
| 37 | +``` |
| 38 | + |
| 39 | +### 3. Run the Docs Locally |
| 40 | + |
| 41 | +```bash |
| 42 | +mkdocs serve |
| 43 | +``` |
| 44 | + |
| 45 | +Open [http://127.0.0.1:8000](http://127.0.0.1:8000) in your browser. The site hot-reloads |
| 46 | +as you edit files. |
| 47 | + |
| 48 | +### 4. Make Your Changes |
| 49 | + |
| 50 | +- All documentation lives in the `docs/` directory as Markdown files. |
| 51 | +- Navigation is configured in `mkdocs.yml` under the `nav:` key. |
| 52 | +- If you add a new page, add it to the `nav:` section in `mkdocs.yml`. |
| 53 | + |
| 54 | +### 5. Lint Your Markdown |
| 55 | + |
| 56 | +We use [markdownlint](https://github.com/DavidAnson/markdownlint) to keep formatting |
| 57 | +consistent. Configuration is in `.markdownlint.yml`. |
| 58 | + |
| 59 | +If you have Node.js installed: |
| 60 | + |
| 61 | +```bash |
| 62 | +npx markdownlint-cli "docs/**/*.md" |
| 63 | +``` |
| 64 | + |
| 65 | +### 6. Build and Verify |
| 66 | + |
| 67 | +Before submitting, make sure the site builds without errors: |
| 68 | + |
| 69 | +```bash |
| 70 | +mkdocs build --strict |
| 71 | +``` |
| 72 | + |
| 73 | +### 7. Open a Pull Request |
| 74 | + |
| 75 | +Push your changes to your fork and open a PR against the `main` branch. |
| 76 | +Please include a brief description of what you changed and why. |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +## Style Guide |
| 81 | + |
| 82 | +- Write in **plain, friendly English** — our audience includes new FRC students. |
| 83 | +- Use **MkDocs Material admonitions** (`!!! note`, `!!! warning`, `!!! tip`, `!!! danger`) |
| 84 | + to call out important information. |
| 85 | +- Use **numbered lists** for sequential steps, **bullet lists** for unordered items. |
| 86 | +- Code, file names, and commands should use `inline code` or fenced code blocks. |
| 87 | +- Keep lines under **120 characters** where reasonable. |
| 88 | +- Always include the standard "unofficial docs" info box at the top of guide pages: |
| 89 | + |
| 90 | +```markdown |
| 91 | +!!! info "Unofficial Docs" |
| 92 | + This is an unofficial community guide. For the official Luma documentation, see |
| 93 | + [docs.luma.vision/p1](https://docs.luma.vision/p1/). |
| 94 | +``` |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +## Pre-commit Hooks *(Optional)* |
| 99 | + |
| 100 | +If you'd like automatic linting before each commit, install the pre-commit hooks: |
| 101 | + |
| 102 | +```bash |
| 103 | +pip install pre-commit |
| 104 | +pre-commit install |
| 105 | +``` |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +## Code of Conduct |
| 110 | + |
| 111 | +Please be respectful and constructive. This is a community resource — we're all here to |
| 112 | +help FRC teams succeed. |
| 113 | + |
| 114 | +--- |
| 115 | + |
| 116 | +## Questions? |
| 117 | + |
| 118 | +Open an issue on [GitHub](https://github.com/FRC5892/Luma-Docs/issues) or reach out |
| 119 | +to FRC Team 5892. |
0 commit comments