Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 7 additions & 0 deletions www/routes/docs/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,19 @@ export default function DocsPage(props: PageProps<Data>) {
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 (
<>
<Head>
<title>{props.data.page?.title ?? "Not Found"} | graphgen docs</title>
<link rel="stylesheet" href={`/gfm.css?build=${BUILD_ID}`} />
{description && <meta name="description" content={description} />}
<link rel="canonical" href={canonical} />
</Head>
<div class="flex flex-col min-h-screen">
<Header title="docs" active="docs" />
Expand Down
Loading