Phase 3 part 7: Bing, IndexNow and search engine setup

SEO → Search engines: a pull request that adds the IndexNow key file, a
robots.txt naming the sitemap, and turns the sitemap on when the Hugo
config disables it (checked with a build); IndexNow submissions of pages
that go live through Changes or Briefs once the key file is served; the
sitemaps Search Console has; and, with an API key, Bing's traffic,
searches and crawl issues. NewlyLive no longer queries while a result
set holds the database's only connection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 08:45:13 -07:00
co-authored by Claude Opus 5.5
parent bf933971dd
commit 2302fb0436
18 changed files with 1061 additions and 4 deletions
+4 -1
View File
@@ -115,6 +115,8 @@ func (s *Server) renderSearchSettings(w http.ResponseWriter, r *http.Request, er
"Fields": googleFields,
"Speed": pageSpeedKey,
"GiteaKey": giteaToken,
"BingKey": bingKey,
"BingSet": s.Secrets.Has(secrets.BingAPIKey),
"GiteaSet": s.Secrets.Has(secrets.GiteaToken),
"GiteaURL": s.giteaURL(),
"SpeedSet": s.Secrets.Has(secrets.PageSpeedAPIKey),
@@ -142,7 +144,7 @@ func (s *Server) searchSettingsSave(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
if err := s.saveSecrets(r, append(googleFields, pageSpeedKey, giteaToken)); err != nil {
if err := s.saveSecrets(r, append(googleFields, pageSpeedKey, giteaToken, bingKey)); err != nil {
s.serverError(w, err)
return
}
@@ -268,6 +270,7 @@ func (s *Server) RunSEO(ctx context.Context) {
}
s.refreshChanges(ctx)
s.refreshBriefs(ctx)
s.pingNewlyLive(ctx)
select {
case <-ctx.Done():
return