# SEO + Blog + Categories for Randify.pro ## TL;DR > **Quick Summary**: Improve Randify.pro's SEO and content depth to pass Yandex Partner Network (РСЯ) moderation and attract organic search traffic. Fix critical SEO gaps (Open Graph, hreflang, thin content signals), add a bilingual blog with Astro Content Collections, categorize all 28 generators, and enrich page structure with breadcrumbs and related content. > > **Deliverables**: > - Fixed SEO metadata (OG tags, Twitter Cards, x-default hreflang, sitemap i18n) > - Blog infrastructure (content collections, layouts, pages, RSS feeds for EN + RU) > - 8 blog post templates with correct frontmatter (EN + RU) > - 5 category pages for generators (EN + RU) > - Visual breadcrumbs component > - Related generators + related posts components > - Custom 404 page > - Fixed data integrity issues (duplicate JSON keys) > > **Estimated Effort**: Large > **Parallel Execution**: YES — 6 waves > **Critical Path**: Wave 1 (fixes) → Wave 2 (schema) → Wave 3 (blog) → Wave 4 (categories) → Wave 5 (content) → Wave FINAL --- ## Context ### Original Request User was rejected by Yandex Partner Network (РСЯ) without reason specified. Wants organic search traffic instead of paid ads. Needs SEO improvements + blog + generator categorization. ### Interview Summary **Key Discussions**: - Rejection reason unknown; SEO audit identified thin content as primary suspect - Blog articles about randomness topics; user will generate content via neural networks - 5 categories confirmed: Gaming, Security, Decision Making, Creative, Utility - Initial batch: 8 blog post templates with placeholder content **Research Findings**: - SEO audit (explore agent): 8 CRITICAL issues including missing OG tags, thin content, duplicate JSON keys, missing `
` landmarks - Blog best practices (librarian): Astro Content Collections with Zod, `/blog/[slug]` routing, `@astrojs/rss`, `BlogPosting` schema ### Metis Review - No gaps identified after user confirmation of categories and content workflow --- ## Work Objectives ### Core Objective Improve Randify.pro's SEO and content depth to pass Yandex Partner Network (РСЯ) moderation and attract organic search traffic. ### Concrete Deliverables - `src/layouts/BaseLayout.astro` — updated with OG tags, Twitter Cards, x-default hreflang - `astro.config.mjs` — sitemap with i18n hreflang annotations - `src/content/config.ts` — content collections with blog + generator schemas - `src/lib/generator-schema.ts` — updated with `category` field - 28 updated `src/content/generators/*.json` files with category assignments - Fixed `dice.json`, `list.json`, `colors.json` (duplicate keys merged) - `src/pages/blog/[slug].astro` + `src/pages/ru/blog/[slug].astro` — blog post pages - `src/pages/blog/index.astro` + `src/pages/ru/blog/index.astro` — blog index pages - `src/pages/rss.xml.ts` + `src/pages/ru/rss.xml.ts` — RSS feeds - `src/layouts/BlogLayout.astro` — blog-specific layout with `BlogPosting` schema - `src/components/Breadcrumbs.astro` — visual breadcrumb navigation - `src/components/RelatedGenerators.astro` — cross-link box for generator pages - `src/components/RelatedPosts.astro` — tag-based related posts for blog - 5 category pages: `src/pages/generators/category/[category].astro` + RU mirror - `src/pages/404.astro` + `src/pages/ru/404.astro` — custom 404 pages - 8 blog post templates in `src/content/blog/en/` and `src/content/blog/ru/` ### Definition of Done - [ ] `npm run build` → 70+ pages (62 existing + blog + categories + 404) - [ ] `npm run lint` → 0 errors - [ ] OG tags present on all page types (verified via grep on build output) - [ ] RSS feeds accessible at `/rss.xml` and `/ru/rss.xml` - [ ] All 28 generators have category assigned - [ ] No duplicate keys in any generator JSON - [ ] Blog index and post pages render correctly - [ ] Category pages filter generators correctly ### Must Have - Open Graph and Twitter Card meta tags on every page - x-default hreflang annotation - Sitemap with hreflang alternates - Blog content collections with Zod schema - RSS feeds for both EN and RU - 5 category pages with generator filtering - Visual breadcrumbs on generator and blog pages - Related generators on each generator page - Custom 404 page with navigation - Fixed duplicate JSON keys in dice.json, list.json, colors.json - `
` landmarks on about/privacy pages - Blog post templates with correct frontmatter structure ### Must NOT Have (Guardrails) - Do NOT remove YandexRTB or AdBanner components - Do NOT change generator interactive behavior - Do NOT break existing build (must maintain all existing pages) - Do NOT add external SEO tools or services - Do NOT write full blog article content (user generates via neural networks) - Do NOT use dynamic `[slug].astro` for generator pages (maintain separate EN/RU files) --- ## Verification Strategy ### Test Decision - **Infrastructure exists**: YES (vitest, eslint) - **Automated tests**: NO (infrastructure work, no new utilities requiring TDD) - **Agent QA**: YES — every task includes agent-executed verification scenarios ### QA Policy Every task MUST include agent-executed QA scenarios. - **Build verification**: `npm run build` → count pages, check for errors - **Lint verification**: `npm run lint` → 0 errors - **HTML inspection**: grep build output for OG tags, schema markup, hreflang - **Functional verification**: curl or playwright to verify blog/category pages render --- ## Execution Strategy ### Parallel Execution Waves ``` Wave 1 (Foundation fixes — can start immediately): ├── Task 1: Fix duplicate JSON keys in 3 generator files [quick] ├── Task 2: Fix
landmarks on about/privacy pages [quick] ├── Task 3: Fix ad placement on homepage [quick] ├── Task 4: Add x-default hreflang to BaseLayout [quick] ├── Task 5: Fix sitemap i18n config in astro.config.mjs [quick] └── Task 6: Add Open Graph + Twitter Card meta tags [quick] Wave 2 (Schema + data — after Wave 1): ├── Task 7: Update generatorSchema.ts with category field [quick] ├── Task 8: Update all 28 generator JSON files with categories [quick] ├── Task 9: Add Organization schema to BaseLayout [quick] └── Task 10: Create custom 404 page [visual-engineering] Wave 3 (Blog infrastructure — after Wave 2): ├── Task 11: Install @astrojs/rss, set up content collections config [quick] ├── Task 12: Create BlogLayout.astro with BlogPosting schema [visual-engineering] ├── Task 13: Create blog post page EN ([slug].astro) [unspecified-high] ├── Task 14: Create blog post page RU ([slug].astro) [unspecified-high] ├── Task 15: Create blog index pages (EN + RU) [unspecified-high] └── Task 16: Create RSS feeds (EN + RU) [quick] Wave 4 (Categories + content + related components — after Wave 2 + 3): ├── Task 17: Create category pages for generators (EN + RU) [unspecified-high] ├── Task 18: Add category navigation to homepage [visual-engineering] ├── Task 19: Create Breadcrumbs component [visual-engineering] ├── Task 20: Create RelatedGenerators component [unspecified-high] ├── Task 21: Create RelatedPosts component [unspecified-high] ├── Task 22: Create 8 blog post templates EN [writing] ├── Task 23: Create 8 blog post templates RU [writing] └── Task 24: Add blog link to navigation [quick] Wave 5 (Integration — after Wave 4): ├── Task 25: Add related generators to generator pages [unspecified-high] └── Task 26: Add breadcrumbs to generator and blog layouts [unspecified-high] Wave FINAL (After ALL tasks — 4 parallel reviews, then user okay): ├── Task F1: Plan compliance audit (oracle) ├── Task F2: Code quality review (unspecified-high) ├── Task F3: Real manual QA (unspecified-high) └── Task F4: Scope fidelity check (deep) -> Present results -> Get explicit user okay Critical Path: Wave 1 → Wave 2 → Wave 3 + Wave 4 (parallel) → Wave 5 → F1-F4 → user okay Parallel Speedup: Waves 3 and 4 run in parallel after Wave 2. Wave 4 absorbs blog content tasks. Max Concurrent: 6 (Wave 1), 4 (Wave 2), 6 (Wave 3), 8 (Wave 4), 2 (Wave 5) ``` ### Dependency Matrix - **1-6**: None → 7-10 - **7-10**: 1-6 → 11-24 - **11-16**: 7-10 → 22-24, 25-26 - **17-21**: 7-10, 11-16 → 25-26 - **22-24**: 11-16 → 25-26 (content ready for integration) - **25-26**: 17-21, 22-24 → F1-F4 - **F1-F4**: 25-26 → user okay --- ## TODOs - [x] 1. Fix duplicate JSON keys in 3 generator files **What to do**: - Read `src/content/generators/dice.json`, `list.json`, `colors.json` - Each file has duplicate `faq` and `ruFaq` keys (second pair overwrites first) - Merge both FAQ blocks into single `faq` and single `ruFaq` arrays - Verify with `npm run build` that no Zod `.strict()` errors occur **Must NOT do**: - Do NOT delete any FAQ content — merge both blocks - Do NOT change other generator JSON files **Recommended Agent Profile**: - **Category**: `quick` **Parallelization**: - **Can Run In Parallel**: YES - **Parallel Group**: Wave 1 - **Blocks**: None - **Blocked By**: None **References**: - `src/content/generators/dice.json` — duplicate keys at lines 29-37 and 53-57 - `src/content/generators/list.json` — duplicate keys at lines 27-31 and 48-52 - `src/content/generators/colors.json` — duplicate keys at lines 26-35 and 46-55 - `src/lib/generator-schema.ts` — `.strict()` will throw on unknown fields **Acceptance Criteria**: - [ ] `dice.json`, `list.json`, `colors.json` have single `faq` and single `ruFaq` keys - [ ] All original FAQ items preserved (merged, not deleted) - [ ] `npm run build` → PASS (0 Zod errors) **QA Scenarios**: ``` Scenario: Build passes after JSON fix Tool: Bash Preconditions: None Steps: 1. Run: npm run build 2. Assert: no Zod validation errors for dice/list/colors Expected Result: 62 pages built successfully Evidence: .sisyphus/evidence/task-1-build.txt ``` **Commit**: YES (Wave 1) - [x] 2. Fix `
` landmarks on about/privacy pages **What to do**: - Update `src/pages/about.astro` and `src/pages/ru/about.astro`: wrap primary content in `
` - Update `src/pages/privacy.astro` and `src/pages/ru/privacy.astro`: wrap primary content in `
` - Ensure `
` contains the actual content, not the breadcrumb nav **Must NOT do**: - Do NOT change content or styling - Do NOT affect generator pages (they already have `
`) **Recommended Agent Profile**: - **Category**: `quick` **Parallelization**: - **Can Run In Parallel**: YES - **Parallel Group**: Wave 1 - **Blocks**: None - **Blocked By**: None **References**: - `src/pages/about.astro` — lines 21-94, no `
` tag - `src/pages/privacy.astro` — lines 11-84, no `
` tag - `src/layouts/GeneratorLayout.astro` — lines 113-116, correct `
` usage **Acceptance Criteria**: - [ ] About page (EN + RU) has `
` landmark - [ ] Privacy page (EN + RU) has `
` landmark - [ ] `npm run lint` → PASS **QA Scenarios**: ``` Scenario: HTML validation shows main landmarks Tool: Bash Preconditions: None Steps: 1. Run: npm run build 2. Grep dist/about/index.html for '
' 3. Grep dist/privacy/index.html for '
' 4. Grep dist/ru/about/index.html for '
' Expected Result: Each file contains exactly one
tag Evidence: .sisyphus/evidence/task-2-main.txt ``` **Commit**: YES (Wave 1) - [x] 3. Fix ad placement on homepage **What to do**: - In `src/pages/index.astro`, move `` from line 50 (before `
`) to after the `
` catalog content - Ensure ad appears below the generator grid, not above it **Must NOT do**: - Do NOT remove YandexRTB component - Do NOT change YandexRTB component itself **Recommended Agent Profile**: - **Category**: `quick` **Parallelization**: - **Can Run In Parallel**: YES - **Parallel Group**: Wave 1 - **Blocks**: None - **Blocked By**: None **References**: - `src/pages/index.astro` — line 50: `` before `
` - `src/components/YandexRTB.astro` — ad block component **Acceptance Criteria**: - [ ] YandexRTB renders after `
` content on homepage - [ ] `npm run build` → PASS **QA Scenarios**: ``` Scenario: Ad placement is after main content Tool: Bash Preconditions: None Steps: 1. Run: npm run build 2. Read dist/index.html 3. Assert:
appears before YandexRTB ad block div Expected Result: Ad block is after the generator catalog grid Evidence: .sisyphus/evidence/task-3-ad.txt ``` **Commit**: YES (Wave 1) - [x] 4. Add x-default hreflang to BaseLayout **What to do**: - In `src/layouts/BaseLayout.astro`, add `` after the existing en/ru hreflang links - The x-default should point to the English version as the fallback **Must NOT do**: - Do NOT remove existing en/ru hreflang links - Do NOT change canonical URL logic **Recommended Agent Profile**: - **Category**: `quick` **Parallelization**: - **Can Run In Parallel**: YES - **Parallel Group**: Wave 1 - **Blocks**: None - **Blocked By**: None **References**: - `src/layouts/BaseLayout.astro` — lines 48-50: canonical + hreflang - Google hreflang guidelines: x-default points to fallback page **Acceptance Criteria**: - [ ] x-default hreflang link present in all page `` elements - [ ] `npm run build` → PASS **QA Scenarios**: ``` Scenario: x-default hreflang present in output Tool: Bash Preconditions: None Steps: 1. Run: npm run build 2. Grep dist/index.html for 'hreflang="x-default"' 3. Grep dist/generators/dice/index.html for 'hreflang="x-default"' Expected Result: Both files contain x-default hreflang link Evidence: .sisyphus/evidence/task-4-hreflang.txt ``` **Commit**: YES (Wave 1) - [x] 5. Fix sitemap i18n config **What to do**: - Update `astro.config.mjs`: pass `i18n` option to `sitemap()` integration - Configuration: `sitemap({ i18n: { defaultLocale: "en", locales: { en: "en-US", ru: "ru-RU" } } })` - Verify build output includes `` in sitemap **Must NOT do**: - Do NOT change other sitemap options - Do NOT remove `@astrojs/sitemap` **Recommended Agent Profile**: - **Category**: `quick` **Parallelization**: - **Can Run In Parallel**: YES - **Parallel Group**: Wave 1 - **Blocks**: None - **Blocked By**: None **References**: - `astro.config.mjs` — line 7: `sitemap()` with no options - `@astrojs/sitemap` i18n docs: https://docs.astro.build/en/guides/integrations-guide/sitemap/#i18n **Acceptance Criteria**: - [ ] `dist/sitemap-0.xml` contains `` entries - [ ] `npm run build` → PASS **QA Scenarios**: ``` Scenario: Sitemap contains hreflang alternates Tool: Bash Preconditions: None Steps: 1. Run: npm run build 2. Read dist/sitemap-0.xml 3. Assert: contains '` structure beyond adding new meta tags **Recommended Agent Profile**: - **Category**: `visual-engineering` **Parallelization**: - **Can Run In Parallel**: YES - **Parallel Group**: Wave 1 - **Blocks**: None - **Blocked By**: None **References**: - `src/layouts/BaseLayout.astro` — lines 36-64: current `` content - astro-paper Layout.astro: https://github.com/satnaing/astro-paper/blob/f3005328e548805226aba54414122c7174645e83/src/layouts/Layout.astro#L71-L106 - AstroWind Metadata.astro: https://github.com/arthelokyo/astrowind/blob/32a3bb96a000c2f5416ea1f795d18666c75ec713/src/components/common/Metadata.astro **Acceptance Criteria**: - [ ] OG tags present in all built HTML pages - [ ] Twitter Card tags present in all built HTML pages - [ ] Default OG image exists at `public/og-default.jpg` - [ ] `npm run build` → PASS **QA Scenarios**: ``` Scenario: OG tags present on homepage Tool: Bash Preconditions: None Steps: 1. Run: npm run build 2. Grep dist/index.html for 'property="og:title"' 3. Grep dist/index.html for 'property="og:description"' 4. Grep dist/index.html for 'property="og:image"' 5. Grep dist/index.html for 'property="twitter:card"' Expected Result: All OG and Twitter tags present Evidence: .sisyphus/evidence/task-6-og.txt Scenario: OG tags present on generator page Tool: Bash Preconditions: None Steps: 1. Grep dist/generators/dice/index.html for 'property="og:title"' 2. Assert: og:title contains "Dice Roller" Expected Result: OG tags populated with generator-specific data Evidence: .sisyphus/evidence/task-6-og-gen.txt ``` **Commit**: YES (Wave 1) - [x] 7. Update generatorSchema.ts with category field **What to do**: - Add `category` field to `generatorSchema` in `src/lib/generator-schema.ts` - Type: `z.enum(["gaming", "security", "decision-making", "creative", "utility"])` - Add `category` to the TypeScript `Generator` type inference - Ensure `.strict()` still works (category must be in all JSON files before build) **Must NOT do**: - Do NOT remove `.strict()` from schema - Do NOT add other new fields **Recommended Agent Profile**: - **Category**: `quick` **Parallelization**: - **Can Run In Parallel**: YES - **Parallel Group**: Wave 2 - **Blocks**: 8 - **Blocked By**: 1-6 **References**: - `src/lib/generator-schema.ts` — current schema with `.strict()` - `src/data/generators.ts` — imports and uses `generatorSchema.parse()` **Acceptance Criteria**: - [ ] `category` field added to schema - [ ] TypeScript `Generator` type includes `category` - [ ] `npm run lint` → PASS **QA Scenarios**: ``` Scenario: Schema compiles without errors Tool: Bash Preconditions: None Steps: 1. Run: npm run lint 2. Assert: 0 errors Expected Result: lint passes Evidence: .sisyphus/evidence/task-7-schema.txt ``` **Commit**: YES (Wave 2) - [x] 8. Update all 28 generator JSON files with categories **What to do**: - Add `"category"` field to ALL 28 files in `src/content/generators/*.json` - Categories per generator (confirmed by user): - **gaming**: dice, cards, lottery, wheel, magic8ball, rps - **security**: password, hash, uuid - **decision-making**: coin, yesno, weighted, teams - **creative**: colors, gradient, palette, fontpair, lorem - **utility**: numbers, date, time, shuffler, letter, names, meal, emoji, country, list - Verify `npm run build` passes after all updates **Must NOT do**: - Do NOT change any other fields in JSON files - Do NOT skip any generator file **Recommended Agent Profile**: - **Category**: `quick` **Parallelization**: - **Can Run In Parallel**: YES (after Task 7) - **Parallel Group**: Wave 2 - **Blocks**: 17-18 - **Blocked By**: 7 **References**: - `src/content/generators/*.json` — all 28 files - `src/lib/generator-schema.ts` — updated schema with category field **Acceptance Criteria**: - [ ] All 28 JSON files have `"category"` field - [ ] `npm run build` → PASS (62 pages, 0 Zod errors) **QA Scenarios**: ``` Scenario: Build passes with all categories Tool: Bash Preconditions: Task 7 completed Steps: 1. Run: npm run build 2. Assert: 62 pages built, no Zod validation errors Expected Result: Build succeeds Evidence: .sisyphus/evidence/task-8-build.txt ``` **Commit**: YES (Wave 2) - [x] 9. Add Organization schema to BaseLayout **What to do**: - Add `Organization` JSON-LD schema to `src/layouts/BaseLayout.astro` - Include: `@type: "Organization"`, `name: "Randify"`, `url`, `logo` - Inject via `