bingo: ping IndexNow when the card changes

A newly recorded incident only showed up in search once a crawler
happened to come back. IndexNow lets Bing, Yandex and the other
participating engines know about changed URLs right away.

Bingo::IndexNow posts the card URLs plus the affected datacenter pages
to api.indexnow.org, in a background thread so admin saves don't wait.
Incidents ping their datacenter. Edits ping the datacenter, or every
page when positions move (create, delete, reorder, sort). A deleted
datacenter's pages are included so the engines see the 404. BingoWeb
serves the key at /<key>.txt.

The key comes from the INDEXNOW Forgejo secret, written to .env as
INDEXNOW_KEY. With no key set this does nothing.

Assisted-by: Claude:opus-5
This commit is contained in:
Sergei Poljanski 2026-10-10 09:42:46 +04:00
commit 26e862ff04
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
6 changed files with 106 additions and 2 deletions

View file

@ -22,3 +22,5 @@ MAIL_TO=ie@asxp.io
# BINGO_HOST=bingo.localhost
# Optional second hostname serving the same card.
# BINGO_ALT_HOST=bingo2.localhost
# IndexNow key (8-128 chars, A-Z a-z 0-9 -); unset = no pings, no key file.
# INDEXNOW_KEY=