From 4e354d2721fb8cf616b384556aa33084365cd470 Mon Sep 17 00:00:00 2001 From: Brad Rodgers Date: Wed, 23 Sep 2026 09:48:07 -0400 Subject: [PATCH] fix: stop publishing draft insights; remove developer copy from contact page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two defects that would have shipped to visitors at cutover. Draft posts were reaching the build. The insights schema declares a `draft` flag and rss.xml.ts filters on it, but [slug].astro called getCollection() unfiltered, so /insights/example-draft/ was generated and listed in sitemap-0.xml. "Example draft insight" would have been crawled and indexed. Filter in getStaticPaths, matching the existing pattern in rss.xml.ts. Build drops from 21 to 20 pages and the URL is gone from the sitemap. The contact page rendered two notes written for developers, not visitors: one explaining that the form "posts to the configured endpoint when PUBLIC_CONTACT_FORM_ENDPOINT is set", and a "Discovery note" about the WordPress page containing placeholder contact values. Replace the first with a line addressed to the reader and drop the second; the deviation it described is already recorded in docs/content-deviations.md, which is where it belongs. build 0/0, seo:lint clean on 20 pages. e2e unchanged at 42/46 — the 4 failures are the pre-existing stale assertions tracked in docs/launch-checklist.md section 2.1. --- src/pages/contact.astro | 8 +------- src/pages/insights/[slug].astro | 4 +++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pages/contact.astro b/src/pages/contact.astro index 676bea2..73f9eab 100644 --- a/src/pages/contact.astro +++ b/src/pages/contact.astro @@ -27,17 +27,11 @@ const endpoint = import.meta.env.PUBLIC_CONTACT_FORM_ENDPOINT ?? "";

Contact Info

Phone
{site.phone}

Email
{site.email}

-

- Discovery note: the current WordPress contact page includes placeholder phone and email - values. This rebuild uses the verified homepage/footer contact details. -

Request a consultation

- The form is static-first and posts to the configured endpoint when - PUBLIC_CONTACT_FORM_ENDPOINT is set. Without an endpoint, it opens an email - draft after validating required fields. + Tell us about your project and we will follow up within two business days.

diff --git a/src/pages/insights/[slug].astro b/src/pages/insights/[slug].astro index 41dcd39..5a8dd2d 100644 --- a/src/pages/insights/[slug].astro +++ b/src/pages/insights/[slug].astro @@ -6,7 +6,9 @@ import ContactCta from "@components/ContactCta.astro"; import { breadcrumbSchema, pageSchema } from "@utils/schema"; export async function getStaticPaths() { - const posts = await getCollection("insights"); + // Drafts must never reach the build: an unfiltered getCollection() published + // /insights/example-draft/ AND listed it in the sitemap. Matches rss.xml.ts. + const posts = await getCollection("insights", ({ data }) => !data.draft); return posts.map((post) => ({ params: { slug: post.slug }, props: { post },