|
| 1 | +# Contributing |
| 2 | + |
| 3 | +This site is deliberately easy to extend — it's just Markdown and one YAML file. That makes it |
| 4 | +friendly for both human contributors and AI agents. |
| 5 | + |
| 6 | +## Add a new page (the 30-second version) |
| 7 | + |
| 8 | +1. Create a new `.md` file under `docs/` in the right folder (e.g. `docs/cookbook/swap-mesh.md`). |
| 9 | +2. Add it to the `nav:` list in [`mkdocs.yml`](https://github.com/YOUR_USER/SC6ModdingDocs/blob/main/mkdocs.yml) so it shows up in the sidebar. |
| 10 | +3. Open a PR. CI will build the site; GitHub Pages / Cloudflare Pages will redeploy on merge. |
| 11 | + |
| 12 | +That's the whole workflow. You do **not** need to know JavaScript, React, Vue, or Astro. |
| 13 | + |
| 14 | +## Rules of thumb for AI agents |
| 15 | + |
| 16 | +When an AI agent is adding or editing pages, it should: |
| 17 | + |
| 18 | +- **Prefer Markdown primitives** — tables, fenced code blocks, bullet lists — over custom HTML. |
| 19 | +- **Use admonitions** for non-prose content: |
| 20 | + ``` |
| 21 | + !!! warning "Title" |
| 22 | + Body text. |
| 23 | + ``` |
| 24 | + Supported: `note`, `tip`, `info`, `warning`, `danger`, `example`, `question`, `success`, `failure`. |
| 25 | +- **Label code fences** with a language (`lua`, `cpp`, `ini`, `json`, `text`) so syntax highlighting works. |
| 26 | +- **Link relatively** between pages (`../ue4ss/hooks.md`), never absolute URLs for in-site links. |
| 27 | +- **Keep page titles as H1** at the top of the file (`# Title`). |
| 28 | +- **Update `mkdocs.yml` `nav:`** whenever you add a new page — otherwise it's orphaned. |
| 29 | +- **Stub pages are fine**: add an `!!! info "Stub"` admonition and a TODO list so future passes know where to expand. |
| 30 | +- **Cite the source** of reversed info (dumper output, hook trace, disasm at address, etc.) in a `> source:` blockquote beneath the claim. |
| 31 | + |
| 32 | +## Local preview (optional) |
| 33 | + |
| 34 | +```bash |
| 35 | +pip install -r requirements.txt |
| 36 | +mkdocs serve |
| 37 | +``` |
| 38 | + |
| 39 | +Open <http://127.0.0.1:8000> — the site live-reloads on save. |
| 40 | + |
| 41 | +## Build |
| 42 | + |
| 43 | +```bash |
| 44 | +mkdocs build # outputs to ./site |
| 45 | +``` |
| 46 | + |
| 47 | +CI does this for you on every push to `main`. |
0 commit comments