From 732657b25b768e16cf40d0fb92d695373917f350 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Wed, 15 Jul 2026 17:39:47 -0700 Subject: [PATCH] SEO: per-city Wikipedia blurbs + travel/compare CTA on city pages (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add unique editorial content so the programmatic pages don't read as templated: - gen_flavor.py seeds backend/cities_flavor.json with a short descriptive blurb per city from Wikipedia's free REST summary API (no key), validating each match by comparing article coordinates to the city's lat/lon so the wrong 'Springfield' never attaches. Retries + modest concurrency; ~700/750 cities get a blurb, the rest render without one. Text is CC BY-SA, attributed with a 'via Wikipedia' link. - City pages show the blurb under the intro and a travel callout that deep-links to the compare page with the city pre-loaded (/compare#loc=lat,lon) — the visitor just adds their own city. Month pages get the same seasonal 'visiting in {month}?' compare link. Both add unique per-page text and internal links. - cities.py gains flavor(slug); tests cover the blurb + attribution + compare CTA. --- static/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/style.css b/static/style.css index fc5266d..c763a77 100644 --- a/static/style.css +++ b/static/style.css @@ -1477,6 +1477,12 @@ table.normals-table tbody tr:hover { background: var(--surface-2); } .climate-records ul { margin: 8px 0; padding-left: 20px; } .climate-records li { margin: 4px 0; } .climate-foot { font-size: 14px; margin-top: 28px; border-top: 1px solid var(--border); padding-top: 16px; } +.city-blurb { font-size: 15px; margin: 4px 0 14px; } +.blurb-src { color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; } +.blurb-src:hover { color: var(--accent); } +.city-travel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin: 28px 0; } +.city-travel h2 { margin-top: 4px; } +.travel-note { font-size: 15px; } /* Hub / directory of cities */ .hub-country { margin: 22px 0; }