diff --git a/site/README.md b/site/README.md index 572f365..a4c7cd4 100644 --- a/site/README.md +++ b/site/README.md @@ -61,8 +61,15 @@ project from the `jeremymcs/patchdeck` repository and set: ### One thing to change after the domain is set -The canonical URL currently points at `https://patchdeck.vercel.app/`. Once the -real domain is attached, update it in three places: +The canonical URL points at `https://patchdeck-eta.vercel.app/`, the alias Vercel +assigned this project. + +> Do not "correct" this to `patchdeck.vercel.app`. That hostname is taken by an +> unrelated project ("PatchDeck — Visual Network Designer") and is not ours; +> pointing the canonical, OG image or sitemap at it would hand our SEO and link +> previews to a stranger's site. + +Once a real domain is attached, update it in three places: - `index.html` — ``, the `og:url` / `og:image` / `twitter:image` meta tags, and the `url` field in the JSON-LD block diff --git a/site/build.mjs b/site/build.mjs index cd4147d..835082c 100644 --- a/site/build.mjs +++ b/site/build.mjs @@ -47,10 +47,26 @@ fs.rmSync(DIST, { recursive: true, force: true }); copyStatic(); if (watch) { + // Build the stylesheet once up front. dist/ was just cleared, and the watcher + // below may take a moment (or fail) to produce it — without this the page + // serves with a 404 on styles.css. + const initial = spawnSync(tailwindBin, cssArgs, { stdio: "inherit" }); + if (initial.status !== 0) process.exit(initial.status ?? 1); + fs.watch(path.join(ROOT, "index.html"), () => copyStatic()); fs.watch(PUBLIC, { recursive: true }, () => copyStatic()); - spawn(tailwindBin, [...cssArgs, "--watch"], { stdio: "inherit" }); - console.log("watching — dist/ is live"); + + // stdin must be an open pipe we never write to or close. The Tailwind CLI + // watcher shuts down the moment stdin reaches EOF, which is what both + // "inherit" (when detached) and "ignore" (/dev/null) hand it immediately. + const watcher = spawn(tailwindBin, [...cssArgs, "--watch"], { + stdio: ["pipe", "inherit", "inherit"], + }); + watcher.on("exit", (code) => { + console.error(`tailwind --watch exited (${code}); css is no longer rebuilding`); + }); + + console.log("watching — dist/ is live on the files it has built"); } else { const result = spawnSync(tailwindBin, [...cssArgs, "--minify"], { stdio: "inherit" }); if (result.status !== 0) process.exit(result.status ?? 1); diff --git a/site/index.html b/site/index.html index 343e589..44b71c3 100644 --- a/site/index.html +++ b/site/index.html @@ -9,22 +9,22 @@ PatchDeck — Keep your pull requests moving - + - - + + - + @@ -41,7 +41,7 @@ "operatingSystem": "macOS, Linux, Windows", "softwareVersion": "1.6.0", "description": "A local-first workbench for keeping GitHub pull requests and issues moving. Watches repositories, syncs review feedback and failed checks into one dashboard, then runs a local coding agent in an isolated worktree.", - "url": "https://patchdeck.vercel.app/", + "url": "https://patchdeck-eta.vercel.app/", "codeRepository": "https://github.com/jeremymcs/patchdeck", "license": "https://opensource.org/licenses/MIT", "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" } diff --git a/site/public/robots.txt b/site/public/robots.txt index cbd6bd9..0d4898d 100644 --- a/site/public/robots.txt +++ b/site/public/robots.txt @@ -1,4 +1,4 @@ User-agent: * Allow: / -Sitemap: https://patchdeck.vercel.app/sitemap.xml +Sitemap: https://patchdeck-eta.vercel.app/sitemap.xml diff --git a/site/public/sitemap.xml b/site/public/sitemap.xml index 0a5630c..5d18317 100644 --- a/site/public/sitemap.xml +++ b/site/public/sitemap.xml @@ -1,7 +1,7 @@ - https://patchdeck.vercel.app/ + https://patchdeck-eta.vercel.app/ weekly 1.0 diff --git a/site/vercel.json b/site/vercel.json index bd5060c..871a8fc 100644 --- a/site/vercel.json +++ b/site/vercel.json @@ -1,5 +1,9 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", + "framework": null, + "buildCommand": "npm run build", + "outputDirectory": "dist", + "installCommand": "npm install", "cleanUrls": true, "trailingSlash": false, "headers": [