Skip to content

Link the AI-debate cluster by its search phrases, with a Related block - #297

Merged
Programcode merged 2 commits into
mainfrom
t3/seo-internal-links-related-blocks
Nov 2, 2026
Merged

Programcode merged 2 commits into
mainfrom
t3/seo-internal-links-related-blocks

Conversation

@Programcode

@Programcode Programcode commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Task 3 from the 2026-11-02 organic spec. The AI-debate cluster pages now link to each other with the phrases people search for, and the home page, the footer, every /debateowl-vs-* page and llms.txt link into the cluster.

Draft only. Do not merge or deploy without Adam's OK.

Depends on the /ai-debate PR (Task 1)

The spec asks for links to /ai-debate, which is not on main yet. Task 1's thread is building that page. This PR includes every /ai-debate link the spec asks for, but a "live": false flag in src/config/ai-debate-cluster.json keeps them out of the pages until Task 1's PR lands. With the flag off, no page links /ai-debate and CI stays green. With it on, the build's check-site step fails on 53 broken /ai-debate links, so nobody can switch it on before the page exists. I tested both states.

Once Task 1 has merged:

  1. Set "live": true on /ai-debate in src/config/ai-debate-cluster.json.
  2. Run python3 scripts/generate_seo_content.py and commit the regenerated public/ pages.

That adds an "AI debate partner" link to the Related blocks, the hub, the footer and llms.txt. Every /debateowl-vs-* page gets "Or argue a motion now against our AI debate partner." The /tools pages get "Want to argue against an AI? Try an AI debate", and the /hu and /es hubs get a link to the English page with hreflang="en".

Task 1 also wires /ai-debate into the footer, the hub and llms.txt itself. Whoever flips the flag should drop one of the two copies. The /ai-debate page is a React page that Task 1 owns, so this PR cannot add the Related block to it. It can render AI_DEBATE_LINKS from src/lib/seo/ai-debate-cluster.ts, which reads the same list.

What changed

  • src/config/ai-debate-cluster.json lists the cluster pages and their anchors. Both page generators, the home page hub, the footer and the /tools pages read it.
  • scripts/seo_cluster.py renders the "More on AI debate" block. This is the spec's <RelatedAiDebate />. It is Python because the cluster pages are generated static HTML, not React.
  • Five cluster pages get the block: /ai-debate-practice, /ai-debate-coach, /best-ai-debate-tools, /best-ai-for-debate, /ai-debate-case-generator. So do /free-vs-paid-ai-debate-tools and /how-to-prepare-for-a-debate-with-ai.
  • Each of the 15 /debateowl-vs-* pages gets one sentence of its own that links "best AI debate tools" to /best-ai-debate-tools. I wrote a separate sentence for each page because the guide tests fail when a long sentence repeats across pages.
  • The home page's "Debate guides and free tools" section gets an "AI debate" group, and the English footer gets an "AI debate" column. The Hungarian and Spanish footers do not, because the pages are in English.
  • llms.txt gets an "AI debate" section with a one-line description per page. llms-full.txt is built from llms.txt, so it picks the section up.
  • docs/operations.md explains the config and the flag.

The anchors are the spec's six, plus "free vs paid AI debate tools" and "how to prepare for a debate with AI". Without those two, both pages had only 5 inlinks, below the spec's minimum of 10. The hub and footer chips start with a capital letter to match the chips around them. The generated pages use the exact lowercase phrases.

Two existing generator rules shape the block on the two comparison-template pages (/free-vs-paid-ai-debate-tools and /how-to-prepare-for-a-debate-with-ai). Those pages must link /best-ai-for-debate exactly once and at most 3 sibling comparison pages. Their bodies already do both, so the block skips /best-ai-for-debate and the sibling pages there. I did not loosen either rule.

To avoid conflicts with the Task 2 retitling thread, this PR changes no titles, H1s, body copy or dateModified dates. If both PRs touch the same generated page, merge main, rerun the generator and commit.

Inbound links

These counts come from node scripts/check-links.mjs --report. It counts how many other sitemap pages link to each page. "Before" is main at 9c64912, built in a scratch worktree.

  • /ai-debate-practice: 33 before, 46 after
  • /ai-debate-coach: 8 before, 24 after
  • /best-ai-debate-tools: 42 before, 58 after
  • /best-ai-for-debate: 50 before, 52 after
  • /ai-debate-case-generator: 37 before, 49 after
  • /free-vs-paid-ai-debate-tools: 5 before, 19 after
  • /how-to-prepare-for-a-debate-with-ai: 5 before, 21 after
  • /ai-debate is not in the sitemap yet, so it has no count.

Broken links: none. check-site passes, and it resolves every internal link, sitemap URL and llms.txt URL. No new link has rel="nofollow".

Checks

  • npm run verify at the head passed all 9 steps: docs, jargon, typecheck, guards, lint, edge, build, smoke and sw-offline.
  • python3 scripts/check_templating.py and the guide-content guards pass.
  • I flipped the flag on, rebuilt, and checked that the /ai-debate links render on the English /tools pages, the Hungarian tool pages and the /hu hub, and that check-site rejects them. Then I flipped it back.
  • I took screenshots of the home page hub and footer on desktop and mobile, a guide page's block, a comparison page's block and one vs-page sentence.
  • Vercel preview, pinned to staging: https://debatelab-staging-8fsdwjxd5-adam-gaborjanis-projects.vercel.app. I fetched /ai-debate-coach and /llms.txt through vercel curl and both show the new links.

Not run: the full desktop and mobile e2e suite, the agentic suite and WebKit. The change is links on static pages and two React components.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added related AI debate guides to relevant articles, comparison pages, and site navigation.
    • Added links from tool pages to the AI debate experience, with translated prompts where available.
    • Expanded the site’s AI debate page listings.
  • Documentation

    • Clarified how AI debate pages appear in related links and when they become available.

The AI-debate pages now link to each other with the phrases people
search for ("AI debate practice", "AI debate coach", "best AI debate
tools", "which AI is best for debate", "AI debate generator", plus
"free vs paid AI debate tools" and "how to prepare for a debate with
AI").

- Each cluster page gets a "More on AI debate" block.
- Each /debateowl-vs-* page gets one sentence of its own that links
  /best-ai-debate-tools.
- The home page guide hub gets an "AI debate" group, and the English
  footer gets an "AI debate" column.
- llms.txt gets an "AI debate" section, and llms-full.txt picks it up
  from there.

src/config/ai-debate-cluster.json is the one list. Both page
generators, the hub, the footer and the /tools pages read it.

/ai-debate is in the list but switched off ("live": false) until its
page ships. Switching it on adds the "AI debate partner" link
everywhere, a "Try an AI debate" line on the /tools pages, and an
English-page link on the /hu and /es hubs. check-site fails the build
if it is switched on before the page exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The change adds a shared AI debate page cluster and uses its live links in generated SEO pages, site navigation, and the llms.txt listing. Related-content links were also added to published AI debate and product-comparison pages.

Changes: AI debate cluster links

Layer / File(s) Summary
Cluster configuration and link rendering
src/config/ai-debate-cluster.json, src/lib/seo/ai-debate-cluster.ts, scripts/seo_cluster.py
The shared configuration defines cluster pages and live status. TypeScript and Python helpers filter live entries and render links, comparison text, and llms.txt entries.
SEO page generation
scripts/generate_seo_content.py, scripts/seo_comparison_pages.py
The generators add related links to eligible pages, comparison-specific links to debateowl-vs-* pages, and cluster entries to llms.txt.
Generated page links and listings
public/ai-debate-*/index.html, public/best-ai-*/index.html, public/debateowl-vs-*/index.html, public/free-vs-paid-ai-debate-tools/index.html, public/how-to-prepare-for-a-debate-with-ai/index.html, public/llms.txt, docs/operations.md
Published AI debate and comparison pages add related links. The llms.txt listing groups AI debate pages in a new section. Operations documentation describes live-link handling.
Application navigation links
src/components/free-tools/ToolPageLayout.tsx, src/components/landing/Footer.tsx, src/components/landing/GuideHub.tsx, src/locales/en.json, src/locales/es.json, src/locales/hu.json, src/locales/tools/*.json
The footer and guide hub use cluster links on English pages and conditionally link to the English AI debate page on translated routes. Tool pages add a translated partner link. Locale files add the related labels.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: cursoragent

Merge Risk: Low · up to 76f68

The links are live despite the stated gating, and some navigation and documentation need correction. These are bounded issues to resolve or acknowledge before release.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…-related-blocks

# Conflicts:
#	public/ai-debate-coach/index.html
#	public/best-ai-for-debate/index.html
#	src/locales/en.json
#	src/locales/es.json
#	src/locales/hu.json
@Programcode
Programcode marked this pull request as ready for review November 2, 2026 18:09
Copilot AI balanced review requested due to automatic review settings November 2, 2026 18:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Programcode
Programcode merged commit 7a60837 into main Nov 2, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants