Files
QR-master/docs/automations/qrmaster-broken-link-cta-checker.md
Timo Knuth aab808c553 Impeccable
2026-04-29 20:34:09 +02:00

58 lines
1.6 KiB
Markdown

# QRMaster Broken Link + CTA Checker
## Goal
Catch broken internal links and broken conversion CTAs on `main`, especially
after direct edits without a pull request.
## What It Checks
- Static internal `href` values in source files.
- Static `router.push("/...")` destinations.
- Internal links against known Next.js app routes and files in `public/`.
- CTA-like links such as "Get started", "Create QR", "Start free",
"Generate QR", "Pricing", and "Upgrade".
- Pages that appear to have no obvious CTA link.
## Command
```bash
npm run check:links
```
The command prints a JSON report. It exits with a non-zero status if broken
internal links or broken CTA links are found.
## Known Limits
- Dynamic CMS/blog slugs are allowed by prefix and not fully validated.
- Runtime-only links built from variables are skipped.
- External links are not checked by this local script.
- This is a fast safety check, not a full crawl of the deployed website.
## Codex Automation Prompt
```text
Run the QRMaster Broken Link + CTA Checker.
Use:
- docs/automations/qrmaster-broken-link-cta-checker.md
- scripts/check-links-and-ctas.js
Run npm run check:links. Review the JSON report and summarize:
1. broken internal links
2. broken CTA links
3. important pages without obvious CTAs
4. concrete fixes with file paths
If the script fails, inspect the listed files and propose the smallest safe fix.
Do not modify production configuration automatically.
```
## Success Criteria
- No broken internal links.
- No broken CTA links.
- Important marketing, tool, and pricing pages have a clear CTA.