feat: HTML sitemap groups API

- GET /_sitemap/api/v1/html?locale= answers the overview: the listed
  addresses of the XML sitemaps by group, in the order pages, offers,
  services, categories (as a tree), posts (newest first), tags, authors,
  other content types, each with its title in the locale, total, the
  first html_page_size links and more
- GET /_sitemap/api/v1/html/{group}?locale=&page= answers one page of a
  group; past the last page, an unknown group or the HTML sitemap off
  answer 404; every answer is noindex; per-IP bucket sitemap-html
- the HTML sitemap tab: html_enabled, the address per locale (html_paths)
  and html_page_size 50 to 500, with errors.html_path and errors.page_size
- contract.Listing.Settings answers HTMLEnabled, HTMLPaths, HTMLPageSize
  and KeyFile
This commit is contained in:
Jakub Zych
2026-11-04 12:32:47 +01:00
parent e02d0b173f
commit 8f4ff2a97d
12 changed files with 981 additions and 67 deletions

View File

@@ -92,8 +92,10 @@ type Listing interface {
// none is configured), IndexURL the absolute address of the sitemap index,
// DefaultLocale the site's default locale ("" when not set) and Groups the
// file groups with listed addresses. HTMLEnabled, HTMLPaths (locale to
// path), HTMLPageSize and KeyFile (the IndexNow key file name) describe the
// HTML sitemap and IndexNow; they stay zero until those settings exist.
// path) and HTMLPageSize are the HTML sitemap's settings (the sitemap
// serves its data at /_sitemap/api/v1/html); KeyFile is the IndexNow key
// file name (<key>.txt, served at /_sitemap/indexnow/<key>.txt for the
// site root), "" while IndexNow is off.
type ListingSettings struct {
SiteURL string
IndexURL string