From 0d8e50cbe3045b102cdaa4302e018bd200d65ae0 Mon Sep 17 00:00:00 2001 From: Will Estes Date: Tue, 4 Aug 2026 18:04:56 -0400 Subject: [PATCH] Move Neon Tan's landing page from bookshop into Hugo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bookshop already supports this: ALLOWED_ORIGIN + CORS on POST /arc/{code} exist specifically so a page on the brand's own domain can call it cross-origin. There was no reason for bookshop to also render the marketing/landing page itself — that put book copy inside a generic, brand-agnostic Go template shared across every brand instead of under normal editorial control like every other page on this site. /books/neon-tan/ is now a plain Hugo page (content/books/neon-tan.md, no longer draft-only/metadata-only — it's rendered for real via the new layouts/books/single.html) with a small JS form (layouts/partials/arc-redeem-form.html, mirroring the existing course-enroll-form.html pattern) that POSTs form-encoded straight to shop.michaelferrara.org/arc/neon-tan. bookshop's GET /arc/{code} page rendering is no longer used for this campaign; only the POST redemption and the download/Kindle/read/checkout endpoints still are. Co-Authored-By: Claude Sonnet 5 --- content/_index.md | 2 +- content/books/neon-tan.md | 18 +++++++- hugo.toml | 1 + layouts/books/single.html | 11 +++++ layouts/partials/arc-redeem-form.html | 61 +++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 layouts/books/single.html create mode 100644 layouts/partials/arc-redeem-form.html diff --git a/content/_index.md b/content/_index.md index cdfc184..e23b0e4 100644 --- a/content/_index.md +++ b/content/_index.md @@ -5,4 +5,4 @@ description: "TODO: one-line author bio/description" TODO: Michael's homepage copy goes here. -Get a free short story: [download the reader magnet](https://shop.michaelferrara.org/arc/neon-tan). +Get a free short story: [download the reader magnet](/books/neon-tan/). diff --git a/content/books/neon-tan.md b/content/books/neon-tan.md index 2ac7f1c..32d5acb 100644 --- a/content/books/neon-tan.md +++ b/content/books/neon-tan.md @@ -2,6 +2,20 @@ title: "Neon Tan" author: "Michael Ferrara" cover_image: "https://downloads.michaelferrara.org/neon-tan/neon_tan_cover.jpg" -description: "The world is stranger than it looks and more meaningful than it lets on. You know this. Sign up to my mailing list and I'll send you a story about an AI, a wisecracking seagull, and a song that needs to be heard." -draft: true +description: "An AI's trademark silver-blue suit isn't exactly beach-town vibes, but he's determined to land his song a spot on the weekly top 40 countdown anyway. After a string of failed attempts to get noticed by the countdown's enigmatic curator DJ, he and his wisecracking seagull sidekick stumble into an open mic night just as a malware glitch hits, forcing him to trade analysis for improvisation, rallying tourists into one spontaneous singalong to discover connection was never something you could calculate." + +# Optional italic line under the title, for handling an objection up front. +hero_subhead: "A free short story, plus occasional emails when something new comes out." + +# Label on the signup form's submit button. +cta_text: "Send me the story" + +# Code of the bookshop ARC campaign this form redeems (see +# reground-tools/arc-campaign.sh) — shop.michaelferrara.org/arc/. +arc_code: "neon-tan" --- +The world is stranger than it looks and more meaningful than it lets on. + +You know this. + +Sign up to my mailing list and I'll send you a story about an AI, a wisecracking seagull, and a song that needs to be heard. diff --git a/hugo.toml b/hugo.toml index d455d5e..9edf276 100644 --- a/hugo.toml +++ b/hugo.toml @@ -13,6 +13,7 @@ disableKinds = ["taxonomy", "term"] description = "TODO: one-line author bio/description" author = "Michael Ferrara" eec_base_url = "https://eec.michaelferrara.org" + bookshop_base_url = "https://shop.michaelferrara.org" [[menu.footer]] name = "Contact" diff --git a/layouts/books/single.html b/layouts/books/single.html new file mode 100644 index 0000000..f6ad2bb --- /dev/null +++ b/layouts/books/single.html @@ -0,0 +1,11 @@ +{{ define "main" }} +
+

{{ .Title }}

+ {{ with .Params.cover_image }}{{ $.Title }} cover{{ end }} + {{ with .Params.hero_subhead }}

{{ . }}

{{ end }} + + {{ .Content }} + + {{ partial "arc-redeem-form.html" (dict "id" "top" "page" .) }} +
+{{ end }} diff --git a/layouts/partials/arc-redeem-form.html b/layouts/partials/arc-redeem-form.html new file mode 100644 index 0000000..2011ef2 --- /dev/null +++ b/layouts/partials/arc-redeem-form.html @@ -0,0 +1,61 @@ +{{ $id := .id }} +{{ $page := .page }} +
+ + + + + +

+ +

+ + +
+

+ +