From 23cf7058f0144ea87c21a4b95ad730cf4bf9c92b Mon Sep 17 00:00:00 2001 From: emil Date: Thu, 14 May 2026 02:48:05 +0300 Subject: [PATCH] =?UTF-8?q?feat(schema):=20Wave=202=20=E2=80=94=20add=20ge?= =?UTF-8?q?nerator=20categories,=20Organization=20schema,=20404=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add category field to generatorSchema (required, 5 values) - Assign categories to all 28 generators - Add Organization JSON-LD schema to BaseLayout - Create custom 404 pages (EN + RU) - Add not-found and blog translation keys --- .sisyphus/boulder.json | 38 ++++++-- .sisyphus/evidence/task-10-404.txt | 28 ++++++ .sisyphus/evidence/task-8-build.txt | 12 +++ .sisyphus/evidence/task-9-org.txt | 16 ++++ .../notepads/seo-blog-categories/learnings.md | 38 ++++++++ .sisyphus/plans/seo-blog-categories.md | 12 +-- src/content/generators/cards.json | 1 + src/content/generators/coin.json | 1 + src/content/generators/colors.json | 1 + src/content/generators/country.json | 1 + src/content/generators/date.json | 1 + src/content/generators/dice.json | 1 + src/content/generators/emoji.json | 1 + src/content/generators/fontpair.json | 1 + src/content/generators/gradient.json | 1 + src/content/generators/hash.json | 1 + src/content/generators/letter.json | 1 + src/content/generators/list.json | 1 + src/content/generators/lorem.json | 1 + src/content/generators/lottery.json | 1 + src/content/generators/magic8ball.json | 1 + src/content/generators/meal.json | 1 + src/content/generators/names.json | 1 + src/content/generators/numbers.json | 1 + src/content/generators/palette.json | 1 + src/content/generators/password.json | 1 + src/content/generators/rps.json | 1 + src/content/generators/shuffler.json | 1 + src/content/generators/teams.json | 1 + src/content/generators/time.json | 1 + src/content/generators/uuid.json | 1 + src/content/generators/weighted.json | 1 + src/content/generators/wheel.json | 1 + src/content/generators/yesno.json | 1 + src/i18n/translations.ts | 12 +++ src/layouts/BaseLayout.astro | 13 +++ src/lib/generator-schema.ts | 1 + src/pages/404.astro | 88 +++++++++++++++++++ src/pages/ru/404.astro | 88 +++++++++++++++++++ 39 files changed, 362 insertions(+), 12 deletions(-) create mode 100644 .sisyphus/evidence/task-10-404.txt create mode 100644 .sisyphus/evidence/task-8-build.txt create mode 100644 .sisyphus/evidence/task-9-org.txt create mode 100644 src/pages/404.astro create mode 100644 src/pages/ru/404.astro diff --git a/.sisyphus/boulder.json b/.sisyphus/boulder.json index 357c6ba..438994f 100644 --- a/.sisyphus/boulder.json +++ b/.sisyphus/boulder.json @@ -157,7 +157,7 @@ "plan_name": "seo-blog-categories", "status": "active", "started_at": "2026-05-13T23:32:06.345Z", - "updated_at": "2026-05-13T23:36:41.704Z", + "updated_at": "2026-05-13T23:47:20.362Z", "session_ids": [ "ses_1de6ede59ffexUwt5C0sddEWwR" ], @@ -173,9 +173,22 @@ "session_id": "ses_1dc4ed5ddffe54aNbdrrVGPkpI", "agent": "Sisyphus-Junior", "category": "quick", - "updated_at": "2026-05-13T23:36:41.704Z", + "updated_at": "2026-05-13T23:40:09.780Z", "started_at": "2026-05-13T23:36:41.704Z", - "status": "running" + "status": "completed", + "ended_at": "2026-05-13T23:40:09.780Z", + "elapsed_ms": 208076 + }, + "todo:7": { + "task_key": "todo:7", + "task_label": "7", + "task_title": "Update generatorSchema.ts with category field", + "session_id": "ses_1dc44f7c9ffeRvYIFc2EOUSbNd", + "agent": "Sisyphus-Junior", + "category": "quick", + "started_at": "2026-05-13T23:42:40.563Z", + "status": "running", + "updated_at": "2026-05-13T23:47:20.363Z" } } } @@ -183,7 +196,7 @@ "active_plan": "/home/emil/Desktop/Coding/AI/Randify.pro/.sisyphus/plans/seo-blog-categories.md", "started_at": "2026-05-13T23:32:06.345Z", "status": "active", - "updated_at": "2026-05-13T23:36:41.704Z", + "updated_at": "2026-05-13T23:47:20.362Z", "session_ids": [ "ses_1de6ede59ffexUwt5C0sddEWwR" ], @@ -199,9 +212,22 @@ "session_id": "ses_1dc4ed5ddffe54aNbdrrVGPkpI", "agent": "Sisyphus-Junior", "category": "quick", - "updated_at": "2026-05-13T23:36:41.704Z", + "updated_at": "2026-05-13T23:40:09.780Z", "started_at": "2026-05-13T23:36:41.704Z", - "status": "running" + "status": "completed", + "ended_at": "2026-05-13T23:40:09.780Z", + "elapsed_ms": 208076 + }, + "todo:7": { + "task_key": "todo:7", + "task_label": "7", + "task_title": "Update generatorSchema.ts with category field", + "session_id": "ses_1dc44f7c9ffeRvYIFc2EOUSbNd", + "agent": "Sisyphus-Junior", + "category": "quick", + "started_at": "2026-05-13T23:42:40.563Z", + "status": "running", + "updated_at": "2026-05-13T23:47:20.363Z" } }, "agent": "atlas" diff --git a/.sisyphus/evidence/task-10-404.txt b/.sisyphus/evidence/task-10-404.txt new file mode 100644 index 0000000..ccb9cf5 --- /dev/null +++ b/.sisyphus/evidence/task-10-404.txt @@ -0,0 +1,28 @@ +Task 10: Custom 404 Pages (EN + RU) +Date: 2026-05-14 +Status: COMPLETE + +Files created: +- src/pages/404.astro +- src/pages/ru/404.astro + +Files modified: +- src/i18n/translations.ts (added notFoundTitle, notFoundMessage, backToHome, blog keys) + +Build verification: +- npm run build: PASS +- Total pages: 64 (62 existing + 2x 404) +- dist/404.html exists (Astro outputs root 404 as 404.html for static host compatibility) +- dist/ru/404/index.html exists + +Content verified: +- EN page contains "Page Not Found" +- RU page contains "Страница не найдена" +- Both pages include breadcrumb back to home, friendly message, and links to home + blog + +Key patterns used: +- BaseLayout with title/description props +- Locale detection via Astro.currentLocale +- Translation keys via useT(lang) +- Identical EN/RU template files (locale-aware links computed from lang variable) +- JSON-LD WebPage schema injected via slot="head" diff --git a/.sisyphus/evidence/task-8-build.txt b/.sisyphus/evidence/task-8-build.txt new file mode 100644 index 0000000..72b8933 --- /dev/null +++ b/.sisyphus/evidence/task-8-build.txt @@ -0,0 +1,12 @@ +Build output for Task 8 (Add category field to all generators + make required in schema) + +Command: npm run build +Result: PASS + +Key metrics: +- 64 pages built +- 0 Zod validation errors +- 0 build errors +- All 28 generator JSON files validated successfully with required category field + +Timestamp: 2026-05-14 diff --git a/.sisyphus/evidence/task-9-org.txt b/.sisyphus/evidence/task-9-org.txt new file mode 100644 index 0000000..7461ee4 --- /dev/null +++ b/.sisyphus/evidence/task-9-org.txt @@ -0,0 +1,16 @@ +Organization Schema Verification +================================ + +Build: PASS +File modified: src/layouts/BaseLayout.astro + +Organization schema found in dist/index.html: +{"@context":"https://schema.org","@type":"Organization","name":"Randify","url":"https://randify.pro","logo":"https://randify.pro/favicon.png"} + +Presence verified across built pages: +- dist/index.html +- dist/ru/index.html +- dist/ru/privacy/index.html +- dist/ru/generators/yesno/index.html +- dist/ru/generators/wheel/index.html +(and all other 63 built pages) diff --git a/.sisyphus/notepads/seo-blog-categories/learnings.md b/.sisyphus/notepads/seo-blog-categories/learnings.md index 2a1d033..264e2b0 100644 --- a/.sisyphus/notepads/seo-blog-categories/learnings.md +++ b/.sisyphus/notepads/seo-blog-categories/learnings.md @@ -8,3 +8,41 @@ - Default OG image generated via Node.js + sharp (1200x630, dark background with accent radial gradients and "Randify" branding). - Build passes; tags verified in `dist/index.html` and `dist/generators/dice/index.html`. + +## Task: Add `category` field to generator schema + +- Added `category: z.enum(["gaming", "security", "decision-making", "creative", "utility"])` to `generatorSchema` in `src/lib/generator-schema.ts`. +- Preserved `.strict()` — unknown fields continue to fail the build. +- The `Generator` type automatically includes `category` via `z.infer`. +- Verified `npm run lint` passes (0 errors). Note: fixed a pre-existing false-positive `no-unused-vars` error on `orgSchema` in `BaseLayout.astro` — the variable is consumed in an Astro `set:html` template expression, which ESLint did not detect. + +## Task 9: Organization Schema (JSON-LD) + +- Added `orgSchema` object in `BaseLayout.astro` frontmatter with `@type: "Organization"`, name, url, and logo. +- Injected second `