|
| 1 | +# Documentation maintenance |
| 2 | + |
| 3 | +The documentation hub lives under `docs/` and renders Markdown guides inside `docs/index.html`. Use this checklist to keep the |
| 4 | +knowledge base accurate whenever workflows or datasets evolve. |
| 5 | + |
| 6 | +## Editing guides |
| 7 | + |
| 8 | +- Place Markdown files inside `docs/docs/` so the loader can fetch them via relative paths. |
| 9 | +- Use descriptive headings and keep tables aligned with two-space indentation to match the rest of the docs. |
| 10 | +- Reference paths exactly as they appear in the repository (for example ``apps/jokes/jokes.js``) so quick searches stay useful. |
| 11 | +- When documenting commands, wrap them in fenced code blocks tagged with the shell language (`````bash```) for consistent |
| 12 | + styling. |
| 13 | + |
| 14 | +## Updating navigation |
| 15 | + |
| 16 | +- Register each new guide in the `guides` array inside `docs/index.html`. Supply an `id`, human-readable `title`, Markdown `file` |
| 17 | + path, and a short `summary`. |
| 18 | +- Keep the `id` stable and URL-friendly—hash navigation uses it to update the address bar and history state. |
| 19 | +- Order entries intentionally: place high-level introductions (`overview`, `architecture`) near the top and workflows or |
| 20 | + reference material further down. |
| 21 | + |
| 22 | +## Previewing changes |
| 23 | + |
| 24 | +1. From the repository root, install dependencies if you have not already: |
| 25 | + ```bash |
| 26 | + npm install |
| 27 | + ``` |
| 28 | +2. Serve the docs with any static server. `npx serve .` exposes the site at `http://localhost:3000/` by default, while |
| 29 | + `python -m http.server` works in Python-heavy environments. |
| 30 | +3. Open `http://localhost:3000/docs/` (or the equivalent port) and cycle through every guide to confirm the navigation, progress |
| 31 | + indicator, and hash routing behave as expected. |
| 32 | + |
| 33 | +## Keeping content fresh |
| 34 | + |
| 35 | +- Mirror updates to Playwright specs, maintenance scripts, and dataset workflows in the relevant guides so the docs remain the |
| 36 | + source of truth. |
| 37 | +- Whenever you touch the offline manifest or service worker, cross-link the change in both the **Data maintenance** and |
| 38 | + **Testing & automation** guides to reinforce the workflow. |
| 39 | +- When you remove or rename a guide, delete the corresponding Markdown file and prune the `guides` array to avoid 404s. |
| 40 | + |
| 41 | +## Pull request expectations |
| 42 | + |
| 43 | +- Documentation updates ship alongside code changes that alter workflows. Avoid leaving TODO comments—describe the intended |
| 44 | + process directly in the Markdown. |
| 45 | +- Before opening a pull request, skim the rendered diff (for example with `git diff --word-diff`) to catch spelling errors and |
| 46 | + missing commands. |
0 commit comments