From e84b9941b4cdc8e83910790e39e092deeb4f8d43 Mon Sep 17 00:00:00 2001 From: imgul <92777653+imgul@users.noreply.github.com> Date: Tue, 20 Oct 2026 19:08:50 +0000 Subject: [PATCH] feat(seo): canonical domain, social preview card and discovery metadata - public/og-image.png: 1200x630 card in the product's own vocabulary, plus matching touch/manifest icons drawn from the favicon geometry. - index.html: canonical URL, 155-char description, full Open Graph set with real image dimensions and alt text, summary_large_image Twitter card, and a single WebApplication JSON-LD block. All URLs absolute on the canonical host. - robots.txt, sitemap.xml (only the rewrites), site.webmanifest, and long-lived cache headers for static assets in vercel.json. - The privacy guard now permits one inert JSON-LD block, but requires it to parse as JSON, and excuses only rel=canonical from the external-link rule. Verified against three deliberate violations. - tests/unit/metadata.test.ts (13 tests) checks tag values, lengths, absolute URLs, real pixel sizes, and that the sitemap cannot drift from the rewrites. 378 tests, typecheck, build and privacy guard green. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- CONTRIBUTING.md | 1 + PROGRESS.md | 24 ++++++ README.md | 2 + docs/DESIGN.md | 14 ++++ docs/PRD.md | 29 ++++++- docs/PRIVACY.md | 2 +- index.html | 67 +++++++++++++++- public/apple-touch-icon.png | Bin 0 -> 4740 bytes public/icon-192.png | Bin 0 -> 4371 bytes public/icon-512.png | Bin 0 -> 14008 bytes public/og-image.png | Bin 0 -> 366010 bytes public/robots.txt | 5 ++ public/site.webmanifest | 15 ++++ public/sitemap.xml | 21 +++++ scripts/check-privacy.mjs | 37 +++++++-- tests/unit/metadata.test.ts | 153 ++++++++++++++++++++++++++++++++++++ vercel.json | 35 +++++++++ 17 files changed, 395 insertions(+), 10 deletions(-) create mode 100644 public/apple-touch-icon.png create mode 100644 public/icon-192.png create mode 100644 public/icon-512.png create mode 100644 public/og-image.png create mode 100644 public/robots.txt create mode 100644 public/site.webmanifest create mode 100644 public/sitemap.xml create mode 100644 tests/unit/metadata.test.ts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8c2cbf..042c15e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,7 @@ The product is only useful because people paste **real secrets** into it. These 4. No file content in a URL, a hash, or a share link. 5. Masked values must not exist in the DOM while masked. 6. Fix blocks, reports (default redaction) and agent prompts must never contain a value. Tests assert this with real-looking strings. +7. No inline executable `` blocks, requires each to parse as JSON, and then + fails on any other inline script. A JSON-LD block that is not valid JSON is treated as an attempt + to hide code. Canonical links are likewise excused from the "no external ``" rule — metadata + is not a fetch. +- **Crawler files are part of the build:** `robots.txt`, `sitemap.xml` (only the three routes that + `vercel.json` rewrites) and `site.webmanifest`, with long-lived cache headers for immutable assets. +- **Enforced by tests,** not by intention: `tests/unit/metadata.test.ts` asserts tag values, absolute + URLs, title/description lengths, JSON-LD validity, the real pixel size of every icon, and that the + sitemap cannot drift from the rewrite list. + ## 14. Technical architecture ### 14.1 Stack decision diff --git a/docs/PRIVACY.md b/docs/PRIVACY.md index 58e90e3..d2f2243 100644 --- a/docs/PRIVACY.md +++ b/docs/PRIVACY.md @@ -1,6 +1,6 @@ # Privacy -EnvCompare exists to be used with real credentials. That only works if you can satisfy yourself — not take our word — that nothing leaves your browser. This page is the long version of [/privacy](https://env-compare.vercel.app/privacy). +EnvCompare exists to be used with real credentials. That only works if you can satisfy yourself — not take our word — that nothing leaves your browser. This page is the long version of [/privacy](https://envcompare.vercel.app/privacy). ## The short version diff --git a/index.html b/index.html index ab130b3..a0d2946 100644 --- a/index.html +++ b/index.html @@ -4,20 +4,81 @@ +