Skip to content

Add a newsletter subscribe block, off until a publication exists - #9

Open
tishachawla-jg wants to merge 1 commit into
mainfrom
feat/newsletter-subscribe
Open

Add a newsletter subscribe block, off until a publication exists#9
tishachawla-jg wants to merge 1 commit into
mainfrom
feat/newsletter-subscribe

Conversation

@tishachawla-jg

Copy link
Copy Markdown
Contributor

There is no way to follow this project by email. The media page lists what we have published and offers no way to hear about the next one.

How it works

js/subscribe.js renders a subscribe card into any <div data-subscribe> slot. Slots are on media.html (under the header) and about.html (in the CTA band).

The publication handle is a single constant and it ships empty:

const AGENTPLANE_SUBSTACK_PUB = '';   // -> set to 'theagentplane' to turn on

While it is empty nothing renders and the slots stay hidden, so the site cannot ship a subscribe button pointing at a publication that does not exist. Turning it on is that one line, after someone creates the publication.

Verified in both states

Against a local server:

Handle Result
'' (as shipped) slot present, innerHTML empty, hidden set, offsetParent null
'theagentplane' flex card renders, token background rgb(22,27,34) and border, CTA -> https://theagentplane.substack.com/subscribe

Styling reuses the existing design tokens and btn btn-solid, so it tracks both themes with no new colours, and stacks on viewports under 640px.

Why not Susheem's existing Substack

susheemk.substack.com is "Susheem's Jottings", a personal three-year-old general software-engineering publication that 3 of the 8 entries in data/posts.json already point at. Pointing the project's subscribe button at it would read as one founder's blog rather than an AgentPlane channel.

theagentplane.substack.com and agentplane.substack.com are both currently unregistered.

Remaining manual step

Creating the publication needs an account, so someone has to do it. After that, set the constant and this goes live. README badges for both repos can follow once the URL is real.

🤖 Generated with Claude Code

There is no way to follow this project by email. The media page lists what we
have published and offers no way to hear about the next one.

js/subscribe.js renders a subscribe card into any <div data-subscribe> slot.
Slots are on media.html (under the header) and about.html (in the CTA band).

The publication handle is a single constant, AGENTPLANE_SUBSTACK_PUB, and it
ships empty. While it is empty nothing renders and the slots stay hidden, so
the site cannot ship a subscribe button pointing at a publication that does not
exist. Setting it to a handle is the only change needed to turn this on.

Styling reuses the existing tokens and the btn btn-solid class, so it tracks
both themes with no new colours. Stacks on narrow viewports.

Not wired to susheemk.substack.com on purpose: "Susheem's Jottings" is a
personal, three-year-old general software engineering publication, and pointing
the project's subscribe button at it would read as one founder's blog rather
than an AgentPlane channel.

Verified against a local server in both states. Empty handle: slot present,
innerHTML empty, hidden, offsetParent null. Handle set: card renders as a flex
row with the token background and border, and the CTA points at
<pub>.substack.com/subscribe.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant