fix: stop publishing draft insights; remove developer copy from contact page

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.
This commit is contained in:
bmr_bluecap committed 2026-09-23 09:48:07 -04:00
1 parent 171c8c96aa
commit 4e354d2721
2 files changed
+4 -8

No files matched your search

+1 -7
View File
@@ -27,17 +27,11 @@ const endpoint = import.meta.env.PUBLIC_CONTACT_FORM_ENDPOINT ?? "";
<h2>Contact Info</h2> <h2>Contact Info</h2>
<p><strong>Phone</strong><br /><a href={`tel:${site.phone.replaceAll("-", "")}`}>{site.phone}</a></p> <p><strong>Phone</strong><br /><a href={`tel:${site.phone.replaceAll("-", "")}`}>{site.phone}</a></p>
<p><strong>Email</strong><br /><a href={site.contactEmailHref}>{site.email}</a></p> <p><strong>Email</strong><br /><a href={site.contactEmailHref}>{site.email}</a></p>
<p class="form-note">
Discovery note: the current WordPress contact page includes placeholder phone and email
values. This rebuild uses the verified homepage/footer contact details.
</p>
</aside> </aside>
<div class="form-panel"> <div class="form-panel">
<h2>Request a consultation</h2> <h2>Request a consultation</h2>
<p class="form-note"> <p class="form-note">
The form is static-first and posts to the configured endpoint when Tell us about your project and we will follow up within two business days.
<code>PUBLIC_CONTACT_FORM_ENDPOINT</code> is set. Without an endpoint, it opens an email
draft after validating required fields.
</p> </p>
<form class="contact-form" method="post" action={endpoint || "/thank-you/"} data-contact-form data-endpoint={endpoint}> <form class="contact-form" method="post" action={endpoint || "/thank-you/"} data-contact-form data-endpoint={endpoint}>
<input type="hidden" name="subject" value="BlueCap Strategies website inquiry" /> <input type="hidden" name="subject" value="BlueCap Strategies website inquiry" />
+3 -1
View File
@@ -6,7 +6,9 @@ import ContactCta from "@components/ContactCta.astro";
import { breadcrumbSchema, pageSchema } from "@utils/schema"; import { breadcrumbSchema, pageSchema } from "@utils/schema";
export async function getStaticPaths() { 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) => ({ return posts.map((post) => ({
params: { slug: post.slug }, params: { slug: post.slug },
props: { post }, props: { post },