thermograph/frontend/content/pages.yaml
Emi Griffith e377c4de03 content: write the entities literally in pages.yaml titles and descriptions
pages.yaml's title/description are interpolated as plain strings into <title>
and <meta name="description">, so html/template escapes them. Writing an HTML
entity in the YAML therefore escapes it a second time and the user sees the
source. Live on main right now:

  <meta name="description" content="... a &amp;plusmn;7-day seasonal window ...">
  <title>Weather &amp;amp; climate glossary: ...</title>

which renders as a literal "&plusmn;7-day" in the SERP snippet and "&amp;" in
the browser tab, on the about and glossary pages. The Python->Go rewrite did not
change this: the entities live in the shared data file and both engines
autoescape identically.

glossary.yaml is deliberately NOT touched. Its `body` is typed template.HTML and
rendered raw (glossary_term.html.tmpl), so the entities and <b> tags there are
correct and would break if "fixed".

The regression test runs against the real content dir, which the frontend
Dockerfile already copies into the builder stage, so it gates the image rather
than only local runs.
2026-07-25 01:35:59 -07:00

28 lines
1.3 KiB
YAML

# SEO title/description for the static pages (not the per-city/per-month pages,
# whose titles are built dynamically from city data in web/content.py). Each key
# is the page identifier passed to content_loader.load_page(); see
# backend/web/content_loader.py and docs/README.md.
pages:
about:
title: "About Thermograph: how the weather grades are calculated"
description: >-
How Thermograph works: ~45 years of ERA5 climate history, a ±7-day
seasonal window, and empirical percentiles that grade each day relative to
its own location.
privacy:
title: "Privacy | Thermograph"
description: >-
What Thermograph does and does not collect: no tracking, no ads, no
account required, and location that never leaves your browser.
hub:
title: "City climate pages: averages, records and how today compares"
description: >-
Browse climate pages for hundreds of cities worldwide: average
temperatures by month, all-time records, and how today's weather compares
to local history.
glossary_index:
title: "Weather & climate glossary: heat index, feels-like, percentile, and more"
description: >-
Plain-language definitions of weather and climate terms: climate normal,
percentile, temperature anomaly, feels-like, heat index, wind chill,
humidity, and reanalysis.