DEV Community

gan liu
gan liu

Posted on

What I Learned Generating 365 Static Pages for a USDA Planting Calendar

I built plantingcalendar.net, a free tool that generates a custom vegetable planting calendar for every USDA hardiness zone. Here is what I learned about static site generation at scale.

The problem with most planting calendars

Most online planting calendars give generic advice that ignores your actual climate. A gardener in Phoenix (Zone 9b) plants tomatoes in February. Someone in Minneapolis (Zone 4b) waits until May. One-size-fits-all advice is worse than no advice.

So I built a tool that creates a unique 12-month calendar for each USDA zone, from Zone 3 to Zone 11.

Generating 365 static pages

Built with Next.js static site generation. The key challenge was not the code. It was the data.

USDA extension office guidelines are scattered across dozens of .edu PDFs. Frost dates vary by microclimate, not just hardiness zone. Some vegetables like garlic have genuinely counterintuitive planting windows that do not match any standard formula.

Each page is statically generated at build time with no database and no runtime API calls. This means near-instant page loads, zero server costs beyond the Cloudflare CDN, and fully crawlable SEO since all content lives in the HTML.

What the numbers look like

Three hundred and sixty five static pages covering every zone and vegetable combination. Twelve month planting tables with indoor start, transplant, and direct sow windows for each crop. Companion planting data and days to maturity on vegetable detail pages. All built in about four evenings with AI coding assistance.

What I would do differently next time

Start with a smaller scope. Three hundred and sixty five pages takes real time to QA one page at a time. Normalize the USDA data before feeding it into the static generator instead of cleaning it on the fly. Add structured data like JSON-LD from day one because retrofitting it across hundreds of pages is genuinely tedious.

If you garden or are just curious about how planting calendars work, try it at plantingcalendar.net. I would love to hear what other data would make it more useful for actual gardeners.

Top comments (0)