Add IndexNow, stable sitemap lastmod, and search-verification meta (#127)
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() <lastmod> (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
<meta> tags from env into every page's <head> — 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.
This commit is contained in:
parent
906c0fd8c7
commit
7492516a04
1 changed files with 15 additions and 0 deletions
|
|
@ -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 <meta> tags in every page's <head>.
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue