From e713b151b8ff5c9e5d0bdd337082f005b8af90ff Mon Sep 17 00:00:00 2001 From: FROWNINGdev <218313741+FROWNINGdev@users.noreply.github.com> Date: Mon, 28 Sep 2026 10:17:11 +0500 Subject: [PATCH] seo: publish the rule reference on the Pages site The Pages homepage linked to docs/rules/{blast-radius,drift,nplusone}.md, but docs/ was excluded from the build, so all three links returned 404. Publishing docs/rules fixes them and gives the site pages of its own: each rule answers a question people search for (.count() > 0 vs .exists(), datetime.now() vs timezone.now(), N+1 in a loop), while the homepage only duplicates the GitHub README. DOL012.md and blast-radius.md stay out: they quote {{ ... }} (a Django template variable, a GitHub Actions expression) that Liquid would render as empty text. Links to those two now point at GitHub. --- README.md | 4 ++-- _config.yml | 8 +++++++- docs/rules/README.md | 4 ++-- docs/rules/drift.md | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8e5b819..53a7c7e 100644 --- a/README.md +++ b/README.md @@ -72,12 +72,12 @@ All of it is here, MIT-licensed, with no tier gate, no seat count, no account, a | Capability usually sold as a paid tier | Here | |---|---| -| PR review bot for schema changes — posts once, then updates in place | [`blast-radius`](docs/rules/blast-radius.md) + the [Action](#️-gate-your-ci) | +| PR review bot for schema changes — posts once, then updates in place | [`blast-radius`](https://github.com/FROWNINGdev/django-orm-lens/blob/main/docs/rules/blast-radius.md) + the [Action](#️-gate-your-ci) | | Analysis that follows a queryset across functions | [`nplusone`](docs/rules/nplusone.md) | | Schema drift detection | [`drift`](docs/rules/drift.md) | | Index proposals from observed QuerySet usage | `suggest-indexes` | | Migration risk weighed against real table sizes | `blast-radius --stats` | -| Blast radius of a destructive migration | [`blast-radius`](docs/rules/blast-radius.md) | +| Blast radius of a destructive migration | [`blast-radius`](https://github.com/FROWNINGdev/django-orm-lens/blob/main/docs/rules/blast-radius.md) | | Cross-layer impact of removing a field | `impact` | **There is no Pro tier, and none is planned.** If the tool saves you an afternoon, a star is the entire ask. diff --git a/_config.yml b/_config.yml index bc111a0..36b8d5e 100644 --- a/_config.yml +++ b/_config.yml @@ -76,7 +76,13 @@ exclude: - test - scripts - cli - - docs + # docs/rules is published: each page answers a query people search for, and + # the README links into it. Two pages stay out because they quote `{{ ... }}` + # (a Django template, a GitHub Actions expression) that Liquid would silently + # blank out; links to them point at GitHub instead. + - docs/i18n + - docs/rules/DOL012.md + - docs/rules/blast-radius.md - Dockerfile - package.json - package-lock.json diff --git a/docs/rules/README.md b/docs/rules/README.md index cb2cb42..b9dfa0b 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -6,7 +6,7 @@ Django ORM Lens ships two rule surfaces: 1. **Editor rules (`DOL###`)** — 18 line-oriented static checks that run inside the VS Code extension on every `.py` file. Findings appear in the Problems panel under the source `Django ORM Lens`, link to these pages from the diagnostic code, and — where a fix is safe to express as a text edit — carry a QuickFix lightbulb. Detection is regex-based with bounded windows; no Python process is involved. -2. **CLI / CI analyzers** — AST-based checks in the Python package (`pip install django-orm-lens`) for terminals and pipelines: [`migration-risk`](migrations.md), [`nplusone`](nplusone.md), [`blast-radius`](blast-radius.md) — which joins migration risks with the code that still references what they change — and [`drift`](drift.md), a `makemigrations --check` that needs no Django boot. +2. **CLI / CI analyzers** — AST-based checks in the Python package (`pip install django-orm-lens`) for terminals and pipelines: [`migration-risk`](migrations.md), [`nplusone`](nplusone.md), [`blast-radius`](https://github.com/FROWNINGdev/django-orm-lens/blob/main/docs/rules/blast-radius.md) — which joins migration risks with the code that still references what they change — and [`drift`](drift.md), a `makemigrations --check` that needs no Django boot. ## Severity and applicability @@ -33,7 +33,7 @@ Applicability follows Clippy's semantics. It is a property of each individual fi | [DOL007](DOL007.md) | Possible N+1: attribute access inside for-loop | queryset | warning | unsafe | | [DOL008](DOL008.md) | Field name in a lookup looks misspelled | correctness | warning | suggestion | | [DOL011](DOL011.md) | `null=True` on CharField/TextField | model | warning | suggestion | -| [DOL012](DOL012.md) | Model without `__str__` method | model | info | suggestion | +| [DOL012](https://github.com/FROWNINGdev/django-orm-lens/blob/main/docs/rules/DOL012.md) | Model without `__str__` method | model | info | suggestion | | [DOL013](DOL013.md) | ForeignKey without `on_delete` | model | error | suggestion | | [DOL014](DOL014.md) | CharField without `max_length` | model | error | suggestion | | [DOL015](DOL015.md) | TextField with `max_length` has no DB effect | model | hint | suggestion | diff --git a/docs/rules/drift.md b/docs/rules/drift.md index d4f0441..939d542 100644 --- a/docs/rules/drift.md +++ b/docs/rules/drift.md @@ -82,4 +82,4 @@ No database, no settings module, no installed dependencies — the same reason t ## Related - [`migration-risk`](migrations.md) — is an individual migration dangerous to run? -- [`blast-radius`](blast-radius.md) — what does a schema change hit? +- [`blast-radius`](https://github.com/FROWNINGdev/django-orm-lens/blob/main/docs/rules/blast-radius.md) — what does a schema change hit?