Skip to content

Building in Public

Securing a Newsletter Subscription Form on a Static MkDocs Site

Adding a newsletter subscription form to a static site seems straightforward—until you consider security implications. In this post, I'll share how I implemented a secure newsletter subscription for my MkDocs-based blog using Cloudflare Turnstile and a serverless API.

For the Finfluencers Trade blog, built with MkDocs (a static site generator), I wanted a simple way for readers to subscribe to a newsletter for updates. Static sites can't run server-side code directly, so handling form submissions requires a different approach than dynamic sites (like WordPress or Node.js apps). I needed a solution that was secure, reliable, respected user privacy, and didn't require me to manage a backend just for email signups.

Why I Chose MkDocs for the Blog

Building Finfluencers Trade is a journey, and I'm committed to documenting it openly – the technical challenges, research findings, and strategic pivots. This blog is central to that "Building in Public" approach.

Documenting this journey requires a blog that's easy to manage and integrates with my development workflow. After considering different options, I chose MkDocs with the Material theme because its focus on Markdown, static site generation, and developer experience perfectly matched my needs for the Finfluencers Trade blog.