diff --git a/site/astro.config.mjs b/site/astro.config.mjs index b0a1955..2d84cd6 100644 --- a/site/astro.config.mjs +++ b/site/astro.config.mjs @@ -8,6 +8,9 @@ import mdx from '@astrojs/mdx'; // per-request SSR later with `export const prerender = false;`. // See README.md ("SSR per route") for how. export default defineConfig({ + // Canonical origin (apex 308s to www). Without this, prerendered Astro.url + // is localhost, which leaked into canonical/OG tags on production. + site: 'https://www.pcbjam.com', output: 'static', adapter: vercel(), // MDX lets the Gerber-viewer blog post embed the component diff --git a/site/public/og/og-home.png b/site/public/og/og-home.png new file mode 100644 index 0000000..24a1898 Binary files /dev/null and b/site/public/og/og-home.png differ diff --git a/site/src/layouts/BaseLayout.astro b/site/src/layouts/BaseLayout.astro index 9b87a56..bae8dc1 100644 --- a/site/src/layouts/BaseLayout.astro +++ b/site/src/layouts/BaseLayout.astro @@ -25,7 +25,10 @@ const { // Pages may pass a complete title (containing "PCBJam"); otherwise append the suffix. const fullTitle = title.includes('PCBJam') ? title : `${title} — PCBJam`; -const canonical = Astro.url.href; +// Resolve against `site` — prerendered Astro.url is localhost, and OG crawlers +// require absolute URLs anyway. +const canonical = new URL(Astro.url.pathname, Astro.site ?? Astro.url).href; +const ogImageAbs = new URL(ogImage, Astro.site ?? Astro.url).href; --- @@ -49,11 +52,11 @@ const canonical = Astro.url.href; - + - + {/* Per-page extras (e.g. JSON-LD) */} diff --git a/web/standalone/index.html b/web/standalone/index.html index a40367d..241dd8f 100644 --- a/web/standalone/index.html +++ b/web/standalone/index.html @@ -3,7 +3,32 @@ - KiCad Web + + + + PCBJam - KiCad demo + + + + + + + + + + + +
diff --git a/web/standalone/public/apple-touch-icon.png b/web/standalone/public/apple-touch-icon.png new file mode 100644 index 0000000..cdff324 Binary files /dev/null and b/web/standalone/public/apple-touch-icon.png differ diff --git a/web/standalone/public/favicon.ico b/web/standalone/public/favicon.ico new file mode 100644 index 0000000..19a65cb Binary files /dev/null and b/web/standalone/public/favicon.ico differ diff --git a/web/standalone/public/favicon.svg b/web/standalone/public/favicon.svg new file mode 100644 index 0000000..ee8001a --- /dev/null +++ b/web/standalone/public/favicon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/web/standalone/public/og/og-demo.png b/web/standalone/public/og/og-demo.png new file mode 100644 index 0000000..bd56041 Binary files /dev/null and b/web/standalone/public/og/og-demo.png differ diff --git a/web/standalone/src/pages/HomePage.tsx b/web/standalone/src/pages/HomePage.tsx index b3558f7..8dd45a0 100644 --- a/web/standalone/src/pages/HomePage.tsx +++ b/web/standalone/src/pages/HomePage.tsx @@ -223,7 +223,12 @@ export function HomePage() { return (
-

PCBJam

+

+ PCBJam + + Early-access alpha + +

{staticMode ? "Edit KiCad files in your browser — open an example below or your own local folder. Nothing is uploaded; Save downloads to your machine."