SEO: per-city Wikipedia blurbs + travel/compare CTA on city pages (#98)
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.
This commit is contained in:
parent
a5fbd70d50
commit
732657b25b
1 changed files with 6 additions and 0 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue