mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
Search Console had 5,812 hanzo.ai URLs as 404, 1,323 as duplicates without a canonical and 165 as noindex. Three causes: the export shipped a noindex page that forwarded in the browser at each retired address, every page also answered at /x/, /x.html and www, and each page's .md twin was an indexable copy of it. Retired addresses are now 301s at the edge, rendered into hanzoai/universe by scripts/edge.mjs from lib/edge.ts: MOVED grows the old product taxonomy, the first site's routes, pages later dropped and the gateway's old docs; SHELVES sends the rest of /docs/ to docs.hanzo.ai; and lib/data/retired.json holds the 256 model pages the catalog has dropped, read against the catalog each build renders. The shells go, except the four that are Go import paths, which ?go-get=1 still reads. The sitemap lists only pages at their own address, each with a lastmod from its files' last commit, so deploy and gates check out the whole history. /privacy, /terms and /cookies stay up for the shared footer but point at /legal/*, so they leave the sitemap. /pay and /v1 join the Disallow list. Gates run the edge's rules over the export: every retired address lands on a page in one hop, every page answers at one address, every sitemap URL is final and dated, and no page links a redirect. scripts/crawl.mjs asks production the same questions, and reads a Search Console export.
27 lines
982 B
TypeScript
27 lines
982 B
TypeScript
import type { Metadata } from 'next'
|
|
import { notFound } from 'next/navigation'
|
|
import { Solution } from '@/components/solutions/Solution'
|
|
import { SOLUTIONS, href, solution } from '@/lib/data/solutions'
|
|
import { pageMeta } from '@/lib/page-meta'
|
|
|
|
type Params = { params: Promise<{ slug: string[] }> }
|
|
|
|
// A solution is one segment. The addresses the old Solutions section minted,
|
|
// some two segments deep, are MOVED in lib/publish and answered at the edge.
|
|
export const dynamicParams = false
|
|
|
|
export function generateStaticParams() {
|
|
return SOLUTIONS.map((s) => ({ slug: s.slug.split('/') }))
|
|
}
|
|
|
|
export async function generateMetadata({ params }: Params): Promise<Metadata> {
|
|
const s = solution((await params).slug.join('/'))
|
|
return s ? pageMeta({ title: s.title, description: s.lede, path: href(s) }) : {}
|
|
}
|
|
|
|
export default async function Page({ params }: Params) {
|
|
const s = solution((await params).slug.join('/'))
|
|
if (!s) notFound()
|
|
return <Solution entry={s} />
|
|
}
|