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
+25
View File
@@ -154,3 +154,28 @@ func (c *Client) Analytics(ctx context.Context, site string, q Query) ([]Row, er
q.StartRow += maxRows
}
}
// Sitemap is a sitemap Search Console knows about.
type Sitemap struct {
Path string `json:"path"`
LastSubmitted *time.Time `json:"lastSubmitted"`
LastDownloaded *time.Time `json:"lastDownloaded"`
IsPending bool `json:"isPending"`
Warnings string `json:"warnings"`
Errors string `json:"errors"`
Contents []struct {
Type string `json:"type"`
Submitted string `json:"submitted"`
} `json:"contents"`
}
// Sitemaps lists the sitemaps submitted for a property.
func (c *Client) Sitemaps(ctx context.Context, site string) ([]Sitemap, error) {
var out struct {
Sitemap []Sitemap `json:"sitemap"`
}
if err := c.do(ctx, http.MethodGet, "/sites/"+url.PathEscape(site)+"/sitemaps", nil, &out); err != nil {
return nil, err
}
return out.Sitemap, nil
}