|
| 1 | +# Repository Guidelines |
| 2 | + |
| 3 | +## Scope and Ownership |
| 4 | + |
| 5 | +This repository (`html2rss.github.io/`) is the public docs and feed-directory site built with Astro/Starlight. |
| 6 | +Classify most work here as `docs`. |
| 7 | + |
| 8 | +What this repo owns: |
| 9 | + |
| 10 | +- docs content and navigation under `src/content/docs/` |
| 11 | +- docs-specific components and styling under `src/components/` |
| 12 | +- feed-directory presentation and client behavior |
| 13 | +- generated docs data consumed by the site (`src/data/configs.json`) |
| 14 | + |
| 15 | +What this repo does not own: |
| 16 | + |
| 17 | +- runtime extractor behavior and CLI semantics (`html2rss/`) |
| 18 | +- web API behavior and OpenAPI generation (`html2rss-web/`) |
| 19 | +- feed YAML catalog definitions (`html2rss-configs/`) |
| 20 | + |
| 21 | +When docs describe behavior from other repos, treat those repos as source-of-truth and update docs to match them. |
| 22 | + |
| 23 | +## Cross-Repo Contracts |
| 24 | + |
| 25 | +Before substantial edits, state cross-repo context in your notes: |
| 26 | + |
| 27 | +- Source-of-truth repo |
| 28 | +- Downstream consumer repo(s) |
| 29 | +- Whether this change needs coordinated follow-up outside `html2rss.github.io/` |
| 30 | + |
| 31 | +Common contracts: |
| 32 | + |
| 33 | +- Feed directory data comes from `html2rss-configs` via `bin/data-update`. |
| 34 | +- Ruby gem docs should match `html2rss` behavior and CLI output. |
| 35 | +- Web application docs should match `html2rss-web` behavior and published OpenAPI. |
| 36 | + |
| 37 | +If a cross-repo behavior changed but upstream is not updated yet, document the gap clearly instead of inventing new behavior. |
| 38 | + |
| 39 | +## Generated Artifacts |
| 40 | + |
| 41 | +Treat `src/data/configs.json` as generated. |
| 42 | + |
| 43 | +- Do not hand-edit it. |
| 44 | +- Regenerate with repo-native commands: |
| 45 | + - `make update` |
| 46 | + - or `bin/data-update` (after dependencies are installed) |
| 47 | +- `bin/data-update` reads packaged configs (from `html2rss-configs`) and writes `src/data/configs.json`. |
| 48 | + |
| 49 | +If a change only affects generated data, include the source change rationale in the PR description. |
| 50 | + |
| 51 | +## Build, Test, and Dev Commands |
| 52 | + |
| 53 | +Run commands from `html2rss.github.io/`: |
| 54 | + |
| 55 | +- `make setup` installs dependencies and refreshes generated data |
| 56 | +- `make dev` runs Astro locally |
| 57 | +- `make build` builds production output |
| 58 | +- `make lint` checks formatting |
| 59 | +- `make lintfix` applies formatting fixes |
| 60 | +- `make update` refreshes feed-directory data from packaged configs |
| 61 | + |
| 62 | +Preferred verification flow for docs/content changes: |
| 63 | + |
| 64 | +1. Run targeted check(s) first (`make lint` or `make build`). |
| 65 | +2. Run the broader check set before PR (`make lint` and `make build`). |
| 66 | +3. If feed directory or config references changed, run `make update` and verify resulting diffs. |
| 67 | + |
| 68 | +## Docs Authoring Rules |
| 69 | + |
| 70 | +### Code Snippets |
| 71 | + |
| 72 | +In docs content (`src/content/docs/**`) and docs-supporting components: |
| 73 | + |
| 74 | +- Do not use triple-backtick fenced code blocks. |
| 75 | +- Always render snippets with the `<Code>` component. |
| 76 | +- Use this import: |
| 77 | + `import { Code } from '@astrojs/starlight/components';` |
| 78 | +- Do not use: |
| 79 | + `import Code from "astro/components/Code.astro";` |
| 80 | + |
| 81 | +### Accuracy Rules |
| 82 | + |
| 83 | +- Prefer concrete, verifiable statements over aspirational wording. |
| 84 | +- Keep repo and path references explicit when guidance is cross-repo. |
| 85 | +- When referencing commands that belong to another repo, include that repo directory in the command example. |
| 86 | + |
| 87 | +## Commit and PR Expectations |
| 88 | + |
| 89 | +- Keep each commit scoped to one logical docs change. |
| 90 | +- Do not mix unrelated changes or unrelated generated diffs. |
| 91 | +- In PRs, call out: |
| 92 | + - cross-repo assumptions |
| 93 | + - generated files updated |
| 94 | + - verification commands run |
0 commit comments