Repository navigation
Link every guide from its topic cluster and the home page, name the product in the H1 and JSON-LD - #234
Merged
Conversation
…roduct in the H1 and JSON-LD Related guides now come from four topic clusters (practice, formats, skills, compare) instead of the first 16 entries of PAGES, so the 13 guides that no page linked to get 4 to 18 inbound links. Paragraphs get up to three in-body links from a phrase table, specific phrases first. The home page gets a guide and tool hub above the FAQ, an H1 that names the product, and a FAQ entry separating it from debatelab.ai. WebSite and SoftwareApplication are named for the product with the brand line as an alternate name, and the Organization lists pi-stack.org in sameAs. check-links.mjs fails the build when a sitemap page has fewer than 3 inbound links or the home page links to fewer than 15 sitemap pages, and check-site.mjs now checks the entity graph and that FAQPage questions are visible. The IndexNow script reads the built or live sitemap, posts once to api.indexnow.org, and takes --only and --dry-run (npm run seo:indexnow). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Playwright loads specs as Node ESM, which refuses a JSON import without an import attribute; localization.spec.ts reads its catalogs the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed.
Note 🎁 Summarized by CodeRabbit Free
Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#233 and #235 deepened the guides and retired five of them. The generator keeps main's per-page FAQs, primary-source links, tables, short About block and CONTENT_DATE floor, and this branch's clusters, in-body links and entity JSON-LD. LINKS_DATE is gone: CONTENT_DATE already dates every page from 2026-10-26, which covers the shared related links. The retired slugs leave CLUSTERS; their phrases now link the guides their 301s point to. In-body links also go in list and step items, since the deepened guides put much of their prose there. GuideHub renders nothing on /es and /hu routes, which do not exist yet on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Programcode
added a commit
that referenced
this pull request
Oct 26, 2026
Conflicts resolved:
- i18n.ts: keep both default variable sets, product/brand/host from
main and trialDays/proMonthly from this branch.
- en/es/hu.json: main's new hero headline and subheadline, this
branch's {{trialDays}} trial badge.
- prerender/entry.tsx, check-site.mjs, docs/operations.md: keep both
sides (main's entity graph and FAQ checks, this branch's localized
pages and hreflang check).
GuideHub on /hu and /es now shows only the free tools at their
localized addresses, plus one link to the English guides on the home
page ("Angol nyelvű útmutatók", "Guías en inglés"). The Hungarian tool
labels use this branch's names (Vitaidőmérő, Vitatétel-generátor,
Jegyzetlap), and "cáfolást" follows the review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec 1 from the SEO sprint (
seo-sprint/cody-specs.md): no sitemap page is an orphan any more, the home page links to the guides, the H1 and JSON-LD name the product, and the IndexNow script works on a clean checkout. This is a draft, so please don't merge it until Adam has reviewed it. Nothing here deploys or pings IndexNow.Update: merged with main after #233 and #235
This is a normal merge of
origin/main(04e1a78), with no rebase or force-push.https://source links, tables, the short About block, andCONTENT_DATE2026-10-26 as the earliest date any page can have. It also keeps this PR's clusters, in-body links and entity JSON-LD.LINKS_DATEis gone becauseCONTENT_DATEalready covers the shared Related block.CLUSTERS: debate-collapsing-strategy, ai-vs-traditional-debate-prep, debate-block-file-guide, debate-prep-time-management and debate-pronunciation-and-delivery. The phrases that pointed at them ("collapse", "block files", "prep time", "delivery") now link to the guides their 301s go to. GuideHub never linked a retired page. The only places in the repo that still name them arevercel.jsonand its test.src/i18n.ts. Main has no trial/pricedefaultVariablesyet; they come with Indexable Hungarian and Spanish pages with hreflang (SEO spec 3) #236. This merge leavesproduct/brand/hostalone, and Indexable Hungarian and Spanish pages with hreflang (SEO spec 3) #236 will need to combine both sets./huand/es(spec step 3 not done yet). They don't exist on main yet: they are still redirects to/?lang=. So the HU/ES-only hub (free tools under/hu/tools/*and/es/tools/*, plus "Angol nyelvű útmutatók" or "Guías en inglés") waits for Indexable Hungarian and Spanish pages with hreflang (SEO spec 3) #236. For now GuideHub renders nothing on any/huor/espath, so it won't show English guides on those pages once Indexable Hungarian and Spanish pages with hreflang (SEO spec 3) #236 adds them. Whichever of Link every guide from its topic cluster and the home page, name the product in the H1 and JSON-LD #234 and Indexable Hungarian and Spanish pages with hreflang (SEO spec 3) #236 lands second should add the localized hub.What changed (original PR)
Related links by topic cluster (
scripts/generate_seo_content.py).internal_links()used to takePAGES[:8](orPAGES[8:16]), so pages 17 onward were never linked.CLUSTERSnow puts every page in one of four clusters: practice and product, formats, skills, compare. The "Related" block shows up to 6 pages from the page's own cluster plus one page from each of two other clusters, and both lists start just after the current page, so no two pages show the same eight. The link labels are now the guide H1s; the old labels were trimmed<title>s such as "How to Write a Debate Case Guide". Generation stops if aPAGESslug is missing fromCLUSTERS, or ifCLUSTERSorLINK_PHRASESnames a slug that is not inPAGES.In-body links.
LINK_PHRASESturns the first match of a phrase in a paragraph into a link to its guide. For example, "final focus" links to Public Forum, "reply speech" to World Schools and "rebuttal blocks" to how to practice rebuttals. Pages get at most 3. Specific phrases are tried first, and single words like "clash" and "evidence" only fill pages that are still short. Links skip the page itself and pages its copy already links. Headings, lists, examples, the short answer and FAQs are left alone.python3 scripts/generate_seo_content.py --linkslists what each page got. Three thin pages get only one link because their text has nothing else to anchor on: debate-clash-points, debate-fallacies and debate-motion-analysis, about 65 to 75 words each. I didn't add sentences to them because Spec 2 rewrites all three.Free tool pages. Each one now links to two guides. Timer: how to flow, speech times by format. Flow sheet: how to flow, argument flowchart. Speech time calculator: speech structure, speech times. Hub: speech times, how to flow. The motion generator already linked three guides and is unchanged.
TOOL_PAGES_MODIFIEDmoves to 2026-10-26 for the four pages whose copy changed.Home page hub. New
src/components/landing/GuideHub.tsx, placed above the FAQ and prerendered. It has five plain<a href>lists: Practice with AI (5), Debate formats (6), Skills guides (6), Free tools (/tools and the 4 tools), Compare (best AI debate tools, vs ChatGPT). The practice and skills picks favour the old orphans. Strings are inguideHubin en, es and hu. The es and hu subtitles say the guides are in English. Format names stay in English there, per the glossary, and are on thei18n-untranslatedallowlist.Home page brand signal. This is a text-only change through locale keys, and
Hero.tsx,Navbar.tsxandFooter.tsxare not touched.<title>is unchanged.src/i18n.tsnow setsproduct,brandandhostfromsite.jsonas i18nextdefaultVariables, so any string can use them.The spec's literal wording was "keep the current sentence as the subheading". I kept the definition facts as well, so the subheading is the old H1 sentence followed by the definition. Adam, if you'd rather the subheading were only that one sentence, it's a one-line locale change.
Entity JSON-LD.
WebSite.nameis now the product, withalternateName["DebateLab by Pi-Stack", "debate.pi-stack.org"].SoftwareApplication.nameis the product, with the brand line asalternateName.Organization.sameAsis ["https://pi-stack.org/"], read from a neworganizationSameAsfield insite.json. I didn't add a GitHub profile becausesite.jsonhas no field for one.publisher,authorandaboutstill point at the same#organizationand#software@ids, and the guides' inline Organization carries the samesameAs.Guards.
scripts/check-links.mjsruns innpm run build, right aftercheck-site.mjs. It fails the build when a sitemap page other than /terms, /privacy or /expocit/sources has fewer than 3 inbound links from other sitemap pages, or when / links to fewer than 15 sitemap pages.--reportprints every count. It runs at build time rather than innpm testbecausenpm testhas nodist/;npm run verifyruns the build, so it's covered there.scripts/check-site.mjsnow also fails on:@idin the home-page graph;WebSiteorSoftwareApplicationthat isn't named for the product;Organization.sameAs;publisher,author,aboutorisPartOfthat names an@idthe home page doesn't define.IndexNow (
scripts/indexnow_submit.py,npm run seo:indexnow). It readsdist/sitemap.xmlwhen a build exists and otherwise fetches${origin}/sitemap.xml. It posts once tohttps://api.indexnow.org/indexnow.--only <url...>accepts paths or URLs on our host and rejects any other host.--dry-runprints the request and sends nothing. Host and key location come fromsite.json. The key and key file are unchanged, and it's not wired into CI. I only ran it with--dry-run.Dates. Every guide is dated 2026-10-26 at the earliest, through main's
CONTENT_DATE, which also covers the Related block and in-body links.Tests and docs.
e2e/loading-performance.spec.tsande2e/hungarian-parity.spec.tsmatch the new H1.scripts/test-service-worker-offline.mjsfills{{product}}in the Spanish headline before matching.vercel-deployment-config.test.tspins the build command withcheck-links.mjsadded.docs/operations.mdcovers the clusters, phrase table, link guard, entity checks and IndexNow.Acceptance evidence
All of this comes from a local
npm run buildof this branch, against a build oforigin/main(6f93aa5) for "before".Homepage links to distinct sitemap URLs: 5 before, 27 after.
Inbound links from other sitemap pages, per URL. "main 6f93aa5" is the count before this PR, and "now" is this branch after the merge. 13 pages had none before; now no page has none except /expocit/sources, which the spec exempts:
Guard output after the merge:
check-links: 40 sitemap URLs, inbound links 0-39, homepage links to 27; no problems. The 0 is /expocit/sources. On main the same script reports 19 problems: 13 orphans, 5 pages with 1 link, how-to-flow-in-debate with 2, and the home page at 5.JSON-LD.
check-site: 43 HTML files, sitemap and llms.txt resolve; no problems, with the new entity checks. To make sure they can fail, I editeddist/index.htmlto renameWebSiteand to break a FAQ question, and both were reported:Home-page entity nodes as built:
I didn't run Google's Rich Results Test because it fetches production, and this branch isn't deployed.
IndexNow
--dry-runafter the merge (40 URLs: the 45 in the spec minus the five #235 retired; nothing sent):--only https://example.com/xexits 1 with--only takes URLs on debate.pi-stack.org.Browser check. I built the site, served it with
vite preview, and loaded/in Playwright Chromium four ways: desktop light (en), desktop dark (en), phone light (en) and phone dark (hu). The H1, FAQ q7 and the 24 hub links rendered in each one. No page errors. The only console errors were 404s for/_vercel/insightsand/_vercel/speed-insights, which exist only on Vercel.Verification
npm run verifypassed locally at the merge commita5a25569(Node 22), exit 0:npm test: 90 files, 654 tests passed, including main'sguide-contenttestcheck-site(43 HTML files) andcheck-links(40 URLs, 27 homepage links)@smoke: 47 passedBefore the merge, the two e2e specs that check the new H1 passed on desktop and mobile Chromium. The only failure was
loading-performance.spec.ts:63, a known failure on main. Not run: the full e2e matrix, WebKit, the database gate (no SQL changes) and staging. GitHub Actions is billing-blocked, so these are local results, not a CI pass.🤖 Generated with Claude Code