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}