NerdlyBuilds

Five Markdown Renderers and a 30-Day Fuse: Why AdSense Kept Saying No

An honest post-mortem of this site: an AI pipeline that wrote 61 posts, thumbnails on a 30-day timer, five markdown renderers, and the rebuild that followed.

·8 min read

Illustration: an old automated content machine spitting out blank and torn pages next to a laptop showing a clean blog layout under a desk lamp

For most of this year, NerdlyBuilds had a problem I kept trying to fix with the wrong tools. AdSense kept rejecting it.

When I finally audited the whole site end to end, the answer was not one bug. It was a pile of them, and the biggest one was a decision I’d made on purpose. This is that audit, what I found, and what I tore out.

The machine I built to write for me

The old NerdlyBuilds ran an automated content pipeline on a Cloudflare Worker. On weekdays it asked Claude, with web search turned on, for the latest AI news and saved the results as “trends.” On Friday it took the week’s trends, handed Claude a list of every title already published so it wouldn’t repeat itself, and asked for a finished article: title, excerpt, tags, category, and an 800–1,200 word body. A second call suggested a few image prompts for Gemini. Then an email landed in my inbox with Approve and Reject buttons.

On paper that has a human in the loop. In practice, a review step that only asks “approve or reject?” can’t add anything the writer never had. The model hadn’t built anything. It had read some headlines.

One detail says a lot. The article length wasn’t an editorial choice. The original target was 1,500–2,500 words, and I cut it to 800–1,200 because the whole job had to finish inside a Worker’s 30-second limit. The length of every post on my blog was set by a timeout.

What the audit actually found

I pulled every published article from the live API and ran the numbers. Here’s what came back.

61 published articles between March 7 and October 22. Six went out on a single day in March and five on one day in June. No human writes like that. It’s a mass-production signal, and a reviewer can see it on the archive page in about four seconds.

A median length of 1,048 words, ranging from 835 to 1,406. Every post landed right in the generator’s target band. Real writing is lumpier than that.

A title formula used about 40 times: “Building X with Y: [benefit] in an Afternoon,” or “in 30 Minutes,” or “Complete Guide.” The openings followed a formula too: a news hook (“X just released…”, “New research shows…”) and then “Here’s how to…”

First-person claims about things nobody here built. “Here’s the scorecard system I built.” “How I fine-tuned it.” The model wrote in my voice about experience I didn’t have. That’s the part that bothers me most.

Google’s own wording leaves no room for doubt. The spam policies define scaled content abuse as generating many pages “mainly to manipulate search rankings rather than to help users … no matter how it’s created,” and the AdSense publisher policies list “automatically generated content that hasn’t been manually reviewed or curated” as low-value content. AI isn’t banned. Doing it the way I did it is. Google never told me “your pipeline is the problem,” so that’s my diagnosis, but I’d bet on it.

The technical debt was its own rejection letter

Even if the writing had been great, the site was quietly falling apart. Each of these bugs looked minor on its own.

Thumbnails on a 30-day fuse

58 of 61 thumbnails returned a 404. Only the three newest worked. The cause was a single option on the line that stored generated images in Workers KV. Here’s the old line from the Worker, trimmed to the relevant part:

const imgKey = `img:${result.slug}:${i}`;
await env.BLOG_KV.put(imgKey, image.data, { expirationTtl: 2592e3 });

2592e3 seconds is 30 days. Every image I generated deleted itself a month later, and nothing complained. The articles kept linking to images that no longer existed. Most of them were gone for good by the time I noticed. When I exported the site, only 20 of the 147 media files referenced in posts still existed.

The fix was deleting the option. The lesson cost more: a TTL on anything you’d be sad to lose is a time bomb with a polite name.

Five ways to turn markdown into HTML

I counted five separate markdown implementations across the old site:

  1. A regex renderer in the Worker that produced the stored HTML used for server-side rendering and feeds.
  2. A near-copy of that renderer in the shared front-end script, with the same bugs.
  3. The marked library on the article page, plus a custom pre-processor, used when server rendering didn’t kick in.
  4. A smaller “markdown lite” in the Pages worker for project pages. It wrapped each list item in its own list and didn’t escape prose.
  5. A fallback paragraph wrapper on the projects page, for when everything else was missing.

They disagreed about code fences. The result: 37 code tutorials had zero real code blocks in the rendered page, and 57 posts had code-like text flattened into regular paragraphs. One fence-repair function returned early if the text contained a triple backtick anywhere at all. So a single good fence turned off repair for the whole post.

Picture a reviewer opening a “how to set up X” post and finding the commands smeared across a paragraph. They don’t think “renderer drift.” They think “low quality.”

Ad boxes with nothing in them

The article and blog pages showed six dashed placeholder boxes labeled things like “Ad — in-article” and “Ad — sidebar.” None of them held a real ad unit. The only real unit on the whole site, on the homepage, had data-ad-slot="auto", which isn’t a valid slot. So I was asking Google for ads on pages that already advertised ads that didn’t exist.

The hero video that turned into a web page

The strangest one. After an unrelated deploy, the homepage video vanished. The URL for the MP4 was returning about 41 KB of HTML. During the deploy there was a brief window when the file path was missing, and Pages served its HTML fallback. Cloudflare’s edge cached that response. Since my headers marked /assets/* as max-age=31536000, immutable, the broken copy was pinned for a year.

The real 21.9 MB video was fine the whole time. Checking the file’s magic bytes and comparing the bare URL against a cache-busted one proved it, and a single-URL purge fixed it. The lesson is now a rule: immutable only goes on hashed filenames, never on a file that can change at a fixed path. It’s the same habit I wrote about in The Brain in the Basement: measure the real thing before you trust the story in your head.

The triage

Once I could see all of it, the decision got easier. I sorted all 61 posts against one question: did I actually build or run the thing this post describes?

  • Kept: 5. The first-hand Jarvis write-ups and the desktop HUD post, like If a Drive Dies Tonight and the Jarvis project they hang off.
  • Held for rewrite: 12. Topics close enough to things I’ve really done that they could become honest posts. They sit in the repo as hidden drafts and don’t appear on the site until I rewrite them myself.
  • Retired: 44. Gone, and their old URLs return 410 Gone so search engines stop asking.

What I rebuilt

The new site is an Astro app on Cloudflare. The structural changes map directly onto the failures above.

Posts are Markdown files in Git. No more KV records with expiry timers. If it’s in the repo, it exists. Images live next to the posts as local files, and a lint step fails the build if any image reference doesn’t resolve.

One markdown pipeline. One renderer, with sanitizing and syntax highlighting, shared by every page. When I imported the surviving posts, 65 broken code blocks were repaired automatically and 27 dead image references were removed.

A content linter that runs on every change. It checks four things: images resolve to local files, internal links point at routes that really exist, no external images, and no raw script or iframe tags. CI runs it on every pull request along with a full build and a link check.

No placeholder ads, and no ads on the homepage. Ads go on article pages only, inside real content.

A homepage that doesn’t weigh 22 MB. The hero video went from 21.9 MB to 2.61 MB after re-encoding, and the homepage ships about 6.6 KB of gzipped first-party JavaScript.

Before and after the rebuild: Markdown renderers went from 5 to 1, broken thumbnails from 58 of 61 to 0, the homepage hero video from 21.9 MB to 2.61 MB, and 61 posts became 5 kept, 12 being rewritten and 44 retired

How a post gets made now

You’ll notice the irony: AI still helps here. I just moved it to a different spot in the process.

A post starts in my notes, written while I build something. An AI agent can turn those notes into a draft, but the only thing it can do with that draft is open a pull request. It can’t publish, merge, or touch anything outside the content folder. Then I read it on a staging preview, check it against what I actually built, and either merge it myself or send it back. The How this site is made page lays out the full rules.

The old pipeline started from the news and asked an AI to sound like me. The new one starts from my own notes. Only one of those has anything worth reading.

What I’d tell past me

  • Count before you guess. Fixing one page at a time never showed me the pattern. A single pass over the whole corpus did.
  • Anything that expires should be something you’re happy to lose. Trends, rate limits, sessions: fine. Published images: absolutely not.
  • Every extra renderer is another chance to disagree. Five renderers meant five sets of bugs.
  • A review step that only says “approve” isn’t review. The human in the loop has to bring something the machine can’t, and for a maker’s blog that’s having actually built the thing.

The plan from here: let Google re-crawl the rebuilt site for a few weeks, keep publishing posts like this one, and then reapply.

— Colby, NerdlyBuilds

Get an email when I publish something new