Back to the building6Level 6 · Drinky-Drink
Level 6 · Case study

Drinky-Drink

A cocktail site where every page is generated from clean data.

I rebuilt a WordPress site whose recipe pages were failing, without losing a single old link.

Drinky-Drink homepage: the ingredients of an Old Fashioned floating apart
I

WordPress to Astro

Same site, same recipes, rebuilt from the data up. Drag to compare.

After: the rebuilt Drinky-Drink homepage with an Old Fashioned fully built Before: the old WordPress homepage on a Genesis theme, with a search box and featured cocktail photos
Before · WordPressAfter · Astro

Before: a Genesis child theme on WordPress.After: static Astro pages on a Cloudflare Worker.

II

The brief

Every page is computed from recipe data.No AI writes anything at build time.

Drinky-Drink started on WordPress, on a Genesis child theme. Over time the pages people actually came for, the recipes and the ingredients, started returning server errors.

Instead of patching the theme, I pulled the recipes out as data and rebuilt the site as a static Astro site served by a Cloudflare Worker. Every page is generated ahead of time, so there's no database left to fall over.

III

What you can do

Four ways into 609 recipes.

Search results with filter chips
1Search

Plain-English search with filter chips.

A recipe page with flavor profile bars
2Recipe page

Flavor profile, strength and steps.

What's in my bar: ingredient checklist with matching drinks
3What's in my bar

Tick what you have; see what you can make, make with a swap, or are one ingredient away.

Alcohol-free versions of classic cocktails
4Alcohol-free

Alcohol-free versions derived from the originals, where the drink still works without the spirit.

Scroll or swipe sideways
IV

The pipeline

From a messy import to pages that can't drift out of date.

  1. 01637 recipes imported

    The raw import from WordPress. Never edited.

  2. 02Fixes, merges, removals, redirects

    Each kept in its own JSON file, layered on top of the import.

  3. 03The engine

    Computes the flavor profile, method steps and color for every drink, plus an alcohol-free version where one works.

  4. 04866 static pages

    Every page, built ahead of time by Astro.

  5. 05Cloudflare Worker

    Serves the site and sends old WordPress links to their new pages.

V

Anatomy of a recipe page.

None of it is written by hand.
The Negroni recipe page on Drinky-Drink, with numbered notes 1 2 3 4 5
  1. the page tints itself from its ingredients' colors
  2. flavor profile bars
  3. steps written from data, one instruction each
  4. servings stepper rescales the recipe
  5. why this technique, in one line

Every drink starts as a drawing

day one: drawn in code, all 609
Studio photo of a Negroni in a rocks glass with an orange peel
later: a studio photo

Every recipe ships with a glass drawn from its own data: shape, color, ice and garnish. That meant no borrowed photos and no licensing questions. All 609 drinks had an image on launch day. The pages that get the most visits are next in line for a real photo, made in my local image studio and approved by me one at a time.

VI

The hard parts

Four problems that were harder than they looked, and how I solved them.

1

Keeping 1,860 old WordPress URLs alive

Links from search and other sites pointed at WordPress-style addresses that no longer existed.

The fixA Cloudflare Worker runs first and catches the old patterns, backed by nearly 1,300 redirects. A script fetches every known old URL and checks that each one goes straight to a live page, with no redirect chains.

2

Writing method steps for 609 drinks from data

Hand-writing steps for every recipe wasn't realistic, and the imported ones were inconsistent.

The fixAn engine derives the steps from technique, glass, ice, muddling and garnish, and corrects the data when it's wrong: a "stirred" drink with citrus gets shaken.

3

Giving every drink its own look without per-drink images

609 pages with one template would all look the same.

The fixEach page tints itself from its ingredients' colors, so a Negroni glows red. Clear drinks fall back to brass.

4

Alcohol-free versions that make sense

Deleting the spirit from a recipe usually leaves half a drink.

The fixThe engine removes the alcohol, replaces its volume with the drink's own soda or juice, and skips drinks that wouldn't survive it.

VII

The stack

Each piece is there for a reason.

AstroStatic pages, built ahead of time and served fast.
TypeScript engineFlavor, steps, color and virgin versions, covered by 102 tests.
Cloudflare WorkerServes the site, and old links go straight to the new page, with no redirect chains.
JSON data layerThe raw import is never edited; fixes, merges and removals live in their own files.
Static searchA prebuilt index searched in the browser, with no search server to run.
VIII

Results

Recipe pages that were throwing server errors now load as static pages.

866static pages built
1,860old URLs, each goes straight to its new page
609recipes on the new site
637recipes carried over from WordPress

637 recipes came over from WordPress and 609 stayed after merges and removals. With ingredient pages and hubs, that makes 866 pages.

IX

Looking back

What worked

Treating recipes as data. Once the engine existed, a fix landed on every page at once.

What I'd change

I'd start with fewer, better recipes instead of importing all 637 and pruning later, and I'd check each one against the official IBA recipe before building its page. The recipe API is UK-based, so the data came with British spelling and metric measures instead of imperial.

What's next

Grow organic search traffic, feature recipes from bartenders and mixologists, then build a way for it to earn.