diff --git a/deno.json b/deno.json index 02e8a8a..cbb1ec5 100644 --- a/deno.json +++ b/deno.json @@ -13,7 +13,7 @@ "build:cli": "cd cli && deno task build:cli", "dev": "cd www && deno run -A dev.ts", "start": "cd www && deno run -A main.ts", - "staticalize": "deno run -A jsr:@frontside/staticalize@0.3.0/cli --site http://localhost:8000 --output=built --base=https://graphgen-data.netlify.app --retries=3 && deno run -A fix-static-css.ts" + "staticalize": "deno run -A npm:staticalize@0.3.1 --site http://localhost:8000 --output=built --base=https://graphgen-data.netlify.app --canonical=https://frontside.com/graphgen && deno run -A fix-static-css.ts" }, "lint": { "rules": { diff --git a/www/routes/docs/[...slug].tsx b/www/routes/docs/[...slug].tsx index ccc09f0..73f96a9 100644 --- a/www/routes/docs/[...slug].tsx +++ b/www/routes/docs/[...slug].tsx @@ -63,12 +63,19 @@ export default function DocsPage(props: PageProps) { description = String(props.data.page.data.description); } + // The page a reader actually arrives at, so that this copy and the one + // frontside.com serves are one page rather than two competing for the same + // searches. Built from the request, which staticalize rewrites onto + // `--canonical` while the rest of the build stays on `--base`. + let canonical = new URL(props.url.pathname, props.url.origin).href; + return ( <> {props.data.page?.title ?? "Not Found"} | graphgen docs {description && } +