DEV Community

Cover image for My marketing docs kept lying, so I put them in CI
Sonny
Sonny

Posted on

My marketing docs kept lying, so I put them in CI

My side project lans.cloud has 100 free browser tools. For three weeks, everything I posted about it — the launch article, the directory listings, the pitch emails — said 37. Then 50. Then 51. Then 50 again, because 51 had been wrong.

Code has tests. Docs drift. And marketing collateral drifts worst, because nothing executes it: a wrong number in a pitch email doesn't throw, it just quietly makes you look sloppy in front of the one blogger you wanted to impress.

So I started treating marketing bookkeeping the way I treat code: continuous integration (CI) for prose — a check that runs on every ship. It's about eighty lines, and it has already caught real mistakes I'd missed by hand.

The facts checker that blocks git push

The recurring bug: my tool count appears in a launch kit, a founder Q&A, standard directory blurbs, social post drafts. Every new tool silently invalidates all of them. Grepping and fixing by hand worked exactly as well as you'd expect — I missed a "forty-one free tools" claim hiding in a directory blurb for weeks.

The fix is a ~80-line script that derives the true count from the code and refuses to ship while any living marketing document disagrees:

// The registry is the single source of truth…
const allToolsSection = registry.slice(
  registry.indexOf('export const ALL_TOOLS')
);
const liveCount = (allToolsSection.match(/status: 'live'/g) ?? []).length;

// …and any "<N> … tools" phrase in living marketing docs must match it.
const COUNT_RE =
  /\b(\d{2,3})\s+(?:(?:live|free|single-purpose|browser(?:-based)?|web)\s+){0,4}tools?\b/gi;
Enter fullscreen mode Exit fullscreen mode

It's wired into the ship script, before the push:

# ship.sh
node scripts/check-marketing-facts.mjs   # exits 1 on drift
git push
Enter fullscreen mode Exit fullscreen mode

One design decision matters more than the code:

Historical documents are exempt. Sent emails, archived posts, old status logs — those keep their numbers. A pitch email I sent when there were thirty-seven tools should say thirty-seven forever. Only the living documents (the ones I'll copy from tomorrow) are checked.

The checker caught a stale "forty-one" on its very first run, and a batch of wrong counts across sixteen locations on its second day. It has paid for itself several times over.

(You may notice the historical counts in this post are spelled out as words. That is not a style choice: the checker scans my drafts too, and it flagged this very article for containing old numbers next to the word "tools". I could add an ignore-marker — or I could let the tooling win. The tooling won.)

Marketing collateral is code that executes in other people's heads. Test it like it matters.

The site is lans.cloud; the first article about its architecture is here. Happy to share any of the scripts in full.

Top comments (0)