|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +## Repository Overview |
| 4 | + |
| 5 | +This is the official user documentation for [WLED](https://github.com/wled/WLED), published at [kno.wled.ge](https://kno.wled.ge) using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/). |
| 6 | + |
| 7 | +All documentation is written in **English**. Contributors improve docs by editing Markdown files and submitting pull requests. |
| 8 | + |
| 9 | +[WLED](https://github.com/wled/WLED) is an open source firmware - written mainly in C++ using platformIO and node.js tooling - for ESP32/ESP8266 microcontrollers controlling addressable LEDs, with a web UI and various networking APIs for custom integrations. WLED is licensed under EUPL-1.2. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## Repository Structure |
| 14 | + |
| 15 | +``` |
| 16 | +WLED-Docs/ |
| 17 | +├── docs/ # All documentation source files |
| 18 | +│ ├── index.md # Landing page |
| 19 | +│ ├── assets/ # Images, stylesheets, JS, MkDocs overrides |
| 20 | +│ │ └── images/content/ # Preferred location for inline images |
| 21 | +│ ├── basics/ # Getting started, installation, compatibility, FAQ |
| 22 | +│ ├── features/ # WLED feature pages (effects, segments, presets, etc.) |
| 23 | +│ ├── interfaces/ # API and protocol docs (JSON API, MQTT, E1.31, etc.) |
| 24 | +│ ├── advanced/ # Wiring, compilation, custom features, etc. |
| 25 | +│ └── about/ # Contributors, roadmap, privacy policy |
| 26 | +├── mkdocs.yml # Site config, navigation, theme settings |
| 27 | +└── README.md # Contributor guide |
| 28 | +``` |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## Page Conventions |
| 33 | + |
| 34 | +Every documentation page must begin with a YAML front matter block: |
| 35 | + |
| 36 | +```yaml |
| 37 | +--- |
| 38 | +title: Page Title |
| 39 | +hide: |
| 40 | + # - navigation |
| 41 | + # - toc |
| 42 | +--- |
| 43 | +``` |
| 44 | + |
| 45 | +- `title` is required and must match the nav entry in `mkdocs.yml`. |
| 46 | +- `navigation` and `toc` are commented out by default (i.e., both are shown). Only hide them when there is a clear design reason (e.g., the landing page hides both). |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## Navigation Registration |
| 51 | + |
| 52 | +Every new page **must** also be registered in the `nav:` section of `mkdocs.yml`. Pages not listed there will not appear in the site navigation. |
| 53 | + |
| 54 | +```yaml |
| 55 | +nav: |
| 56 | + - Section Name: |
| 57 | + - Page Title: section/filename.md |
| 58 | +``` |
| 59 | +
|
| 60 | +Indentation in `mkdocs.yml` is significant. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## Markdown Style |
| 65 | + |
| 66 | +- **Headings**: Use `##` for top-level sections within a page (`#` is optional, as it may conflict with the page title). Use `###` and `####` for sub-sections. |
| 67 | +- **Admonitions**: Use MkDocs Material admonitions (`!!! info`, `!!! tip`, `!!! warning`, `!!! danger`) for callouts. These are rendered as styled boxes on the site. |
| 68 | +- **Tables**: Use standard GFM pipe tables. |
| 69 | +- **Code blocks**: Use fenced code blocks with a language hint (e.g., ` ```yaml `). |
| 70 | +- **Bold/Italic**: Use `**bold**` for important terms. Use `_italic_` sparingly. |
| 71 | +- **Line breaks**: A trailing two-space line break (or `<br />`) is used to force a line break within a paragraph where needed. |
| 72 | +- **Internal links**: Use root-relative paths without the `.md` extension, e.g. `[Segments](/features/segments)`. |
| 73 | +- **External links**: Use standard Markdown link syntax. Prefer linking to stable, canonical URLs. |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## Images |
| 78 | + |
| 79 | +- Store images in `docs/assets/images/content/` whenever possible. Avoid external image hosting — the external resource could disappear at any time. |
| 80 | +- Reference images using a path relative to the page or a root-relative path, e.g.: |
| 81 | + ```markdown |
| 82 | +  |
| 83 | + ``` |
| 84 | +- Animated GIFs hosted on `raw.githubusercontent.com/scottrbailey/WLED-Utils/` are used extensively in the Effects table and are acceptable for that page. |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +## PR Review Checklist |
| 89 | + |
| 90 | +When reviewing a pull request, verify the following: |
| 91 | + |
| 92 | +### Content |
| 93 | + |
| 94 | +- [ ] All text is in **English**. |
| 95 | +- [ ] Content is accurate and consistent with the current WLED feature set. |
| 96 | +- [ ] No duplicate content — check whether similar information already exists on another page and cross-link instead. |
| 97 | +- [ ] Links are valid — no broken internal or external links. |
| 98 | +- [ ] Images are stored in `docs/assets/images/content/` (not external hosting) unless they are GIF previews from the known WLED-Utils repository. |
| 99 | + |
| 100 | +### Formatting |
| 101 | + |
| 102 | +- [ ] Front matter block (`---`) is present and includes a `title` field. |
| 103 | +- [ ] Page title in front matter matches the entry in `mkdocs.yml`. |
| 104 | +- [ ] Heading hierarchy is correct (`#` (optional) → `##` → `###` → `####`, no skipping levels). |
| 105 | +- [ ] Admonitions use the correct type (`info`, `tip`, `warning`, `danger`) for the context. |
| 106 | +- [ ] Tables are properly formatted with pipe characters. |
| 107 | +- [ ] Code blocks use language identifiers. |
| 108 | +- [ ] No unintentional trailing whitespace (two trailing spaces are allowed for forced line breaks). |
| 109 | + |
| 110 | +### Writing Style & Readability |
| 111 | + |
| 112 | +- [ ] Tone is **informal, friendly, and inviting** — avoid overly formal or academic language. |
| 113 | +- [ ] Title case: Use title case for section and subsection headings; articles and short prepositions stay lowercase. |
| 114 | +- [ ] Language is **simple and clear** — short sentences, common words, no unexplained jargon — so non-native English speakers can easily follow. |
| 115 | +- [ ] Logic is easy to follow, examples are kept simple. |
| 116 | +- [ ] Claim calibration: Calibrate verbs to evidence; do not write "proves" when the evidence is "suggests". |
| 117 | +- [ ] No grammar or spelling mistakes. |
| 118 | +- [ ] Express coordinate ideas in the same grammatical form. |
| 119 | +- [ ] Wording is **concise** — remove filler phrases (e.g. "it is worth noting that", "basically", "simply") and redundant sentences. |
| 120 | +- [ ] Prefer "use" over "leverage", "method" over "methodology", "feature" over "functionality". |
| 121 | +- [ ] Contractions (e.g. "you'll", "don't", "it's") are welcome — they help keep the tone approachable. |
| 122 | +- [ ] Avoid idioms or culture-specific phrases (e.g. "beating around the bush", "get your ducks in a row") — they are hard to understand when translated literally into other languages. |
| 123 | +- [ ] Smileys 😊, concrete examples, and images/diagrams/illustrations are encouraged where they help readers grasp the main message. |
| 124 | + |
| 125 | +### Navigation |
| 126 | + |
| 127 | +- [ ] If a new page is added, it is registered in the `nav:` section of `mkdocs.yml` at the correct location and indentation level. |
| 128 | +- [ ] If a page is renamed or moved, the `nav:` entry and all internal links to it are updated. |
| 129 | + |
| 130 | +### Scope |
| 131 | + |
| 132 | +- [ ] Changes are limited to documentation. This repository does not contain WLED firmware code. |
| 133 | +- [ ] PR does not introduce changes to `mkdocs.yml` that alter unrelated pages or nav structure. |
| 134 | + |
| 135 | +--- |
| 136 | + |
| 137 | +## Local Preview |
| 138 | + |
| 139 | +To preview the site locally before submitting: |
| 140 | + |
| 141 | +**Docker (recommended):** |
| 142 | +```bash |
| 143 | +docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material |
| 144 | +``` |
| 145 | + |
| 146 | +**Python/pip:** |
| 147 | +```bash |
| 148 | +pip install mkdocs-material |
| 149 | +mkdocs serve |
| 150 | +``` |
| 151 | + |
| 152 | +Then visit <http://localhost:8000>. |
| 153 | + |
| 154 | +--- |
| 155 | + |
| 156 | +## Automated Deployment |
| 157 | + |
| 158 | +Merges to `main` trigger the GitHub Actions workflow (`.github/workflows/main.yml`), which builds the MkDocs site and deploys it to GitHub Pages automatically. There is no manual deployment step required. |
| 159 | + |
| 160 | + |
| 161 | +## General Guidelines |
| 162 | + |
| 163 | +- **Provide references** when making analyses or recommendations. Base them on the correct branch or PR. |
| 164 | +- **When unsure, say so.** Gather more information rather than guessing. |
| 165 | +- Support factual claims with verifiable citations, references or concrete evidence; **never fabricate citations**. |
| 166 | +- **Acknowledge good patterns** when you see them. Positive feedback always helps. |
| 167 | +- When updating an existing PR, retain the original description. Only modify it to ensure technical accuracy. Add change logs after the existing description. |
| 168 | +- No force-push on open PRs |
0 commit comments