From e3b96007923e42bea4d75b83226f76992a682bd9 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Fri, 10 Jul 2026 22:52:17 -0400 Subject: [PATCH] Add book-lineage note to BookCta for posts drawn from the manuscript Posts that were cut from or adapted from Open & Async now say so explicitly as a soft marketing hook, driven through the auto-appended BookCta rather than inline prose so it stays a single source of truth and survives the launch-day CTA flip without going stale. - New `bookRelation` front-matter field ('adapted' | 'cut') threaded through the post route and PostLayout into BookCta, which swaps its inline headline. - Mark the four cut-from-the-book posts: reorgs-happen, the-brag-doc, one-on-one-playbook, no-agenda-no-meeting. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/components/BookCta.astro | 18 ++++++++++++++++-- src/content.config.ts | 1 + .../posts/2026-04-06-no-agenda-no-meeting.md | 1 + .../posts/2026-04-27-one-on-one-playbook.md | 1 + src/content/posts/2026-04-27-the-brag-doc.md | 1 + src/content/posts/2026-06-07-reorgs-happen.md | 1 + src/layouts/PostLayout.astro | 4 +++- src/pages/[year]/[month]/[day]/[slug].astro | 1 + 8 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/components/BookCta.astro b/src/components/BookCta.astro index 2ff3bbfa2..8b5a9d050 100644 --- a/src/components/BookCta.astro +++ b/src/components/BookCta.astro @@ -14,9 +14,23 @@ import coverImage from '../../assets/img/open-and-async-cover.webp'; interface Props { variant?: 'inline' | 'featured'; + // Marketing hook for posts that came from the manuscript: 'adapted' (a version + // appears in the book) or 'cut' (didn't make the final cut). Swaps the inline + // headline; both read true before and after launch, so no staleness at launch. + relation?: 'adapted' | 'cut' | undefined; } -const { variant = 'inline' } = Astro.props; +const { variant = 'inline', relation } = Astro.props; + +// Explicit, launch-safe headline for the inline variant. Stating the book +// lineage is itself the marketing win: "adapted" signals depth, "cut" signals +// there's more where this came from. +const inlineHeadline = + relation === 'adapted' + ? 'This post is adapted from the book.' + : relation === 'cut' + ? "This post didn't make the book's final cut." + : "Like this post? It's becoming a book."; // Colorize the ampersand with the site's signature lime→pink gradient. // Consume surrounding spaces so mx-1 controls the total whitespace (natural @@ -97,7 +111,7 @@ const commitGraphPaths = ` Coming {siteConfig.bookLaunch}

- Like this post? It's becoming a book. + {inlineHeadline}

- {!hideBookCta && } + {!hideBookCta && } {pubDate && (
diff --git a/src/pages/[year]/[month]/[day]/[slug].astro b/src/pages/[year]/[month]/[day]/[slug].astro index f0b79cb0d..8d468618b 100644 --- a/src/pages/[year]/[month]/[day]/[slug].astro +++ b/src/pages/[year]/[month]/[day]/[slug].astro @@ -82,6 +82,7 @@ const nextPost = nextEntry ? { title: nextEntry.data.title, url: getPostUrl(next nextPost={nextPost} archived={post.data.archived} hideBookCta={post.data.hideBookCta} + bookRelation={post.data.bookRelation} robots={post.data.robots} postId={post.id} postFilePath={post.filePath}