From 7492516a04e8a7d9262d176c62001ea11ab9a1d4 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Thu, 16 Jul 2026 11:08:09 -0700 Subject: [PATCH] Add IndexNow, stable sitemap lastmod, and search-verification meta (#127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Faster search-engine indexing for the ~14k climate/city/record URLs: - IndexNow (backend/indexnow.py): instantly notify Bing/DuckDuckGo/Yandex of new or changed URLs. Per-host key resolved env → gitignored file → generated (mirrors push.py), served at /{key}.txt, and echoed in submissions. `submit_all()` + a `make indexnow` CLI push every indexable URL, batched under the 10k cap. Google doesn't use IndexNow, so it stays on the sitemap. - Sitemap: replace the per-request today() (which churns every fetch and trains crawlers to ignore lastmod) with a stable content-build date; factor the URL list into public_paths() shared with IndexNow so the two never drift. - Search-console verification: render google-site-verification + msvalidate.01 tags from env into every page's — the SEO pages via base.html.j2 and the static pages (incl. the homepage Google verifies) via _page(). - Docs: env example documents the three new vars; .gitignore ignores the key. Tests: key-file route, stable single-date lastmod, IndexNow payload/batching, and verification meta on both SEO and static pages. --- deploy/thermograph.env.example | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/deploy/thermograph.env.example b/deploy/thermograph.env.example index 0daff44..7ba9934 100644 --- a/deploy/thermograph.env.example +++ b/deploy/thermograph.env.example @@ -10,3 +10,18 @@ PORT=8137 # /thermograph -> app under a sub-path (share the host with other apps, e.g. a # portfolio at the root) THERMOGRAPH_BASE=/ + +# --- SEO: search-engine verification + IndexNow --------------------------------- +# Ownership-verification tokens, rendered as tags in every page's . +# Google Search Console → add property https://thermograph.org → "HTML tag" method +# → paste just the content="…" value below. (Or verify via DNS TXT and skip this.) +#THERMOGRAPH_GOOGLE_VERIFY= +# Bing Webmaster Tools → add site → "HTML Meta Tag" (msvalidate.01) → paste the +# content value. (Bing can also import verification from Google Search Console.) +#THERMOGRAPH_BING_VERIFY= + +# IndexNow key (Bing/DuckDuckGo/Yandex instant re-crawl). Auto-generated to +# data/indexnow_key.txt on first use; set here to pin a specific key. +#THERMOGRAPH_INDEXNOW_KEY= +# Public site URL the IndexNow CLI submits (`make indexnow`). +THERMOGRAPH_BASE_URL=https://thermograph.org