Files
sm-sitemap-plugin/models/settings/fields.yaml
Jakub Zych e02d0b173f feat: IndexNow key, key file and pings
- saving with IndexNow on generates a 32-hex key (crypto/rand);
  indexnow_new_key generates a new one, so the old key file answers 404
- GET /_sitemap/indexnow/{file} serves <key>.txt as text/plain while
  IndexNow is on; the SEO layer maps it to the site root
- after each rebuild in production the added, changed and removed
  addresses on the site host are queued as golem15.sitemap.indexnow jobs
  (at most 10 000 per request, five attempts)
- the job posts {host, key, urlList} to api.indexnow.org through a
  fetchguard client limited to that host and records the answer; 429 and
  5xx retry, 400, 403 and 422 do not
- the IndexNow tab shows the S2 status partial: key or no key, last
  notification or never, and the 403, 422 and 429 callouts
2026-11-04 12:26:47 +01:00

130 lines
4.3 KiB
YAML

# ===================================
# Form Field Definitions
# ===================================
#
# Sitemap settings (UI-SPEC C26): Files, Content types (one block per
# signpost content type, added by the plugin's form extension after Files)
# and Additional addresses. A repeater row takes no date picker, so an
# additional address's lastmod is a text field read as YYYY-MM-DD.
fields:
site_url:
label: golem15.sitemap::lang.settings.site_url
comment: golem15.sitemap::lang.settings.site_url_comment
type: text
span: left
tab: golem15.sitemap::lang.settings.tab_files
file_size:
label: golem15.sitemap::lang.settings.file_size
comment: golem15.sitemap::lang.settings.file_size_comment
type: number
default: 1000
span: right
tab: golem15.sitemap::lang.settings.tab_files
_files:
type: partial
path: sitemap_files
span: full
tab: golem15.sitemap::lang.settings.tab_files
extra_urls:
label: golem15.sitemap::lang.settings.extra_urls
comment: golem15.sitemap::lang.settings.extra_urls_comment
type: repeater
prompt: golem15.sitemap::lang.settings.extra_urls_add
titleFrom: url
span: full
tab: golem15.sitemap::lang.settings.tab_extra
form:
fields:
url:
label: golem15.sitemap::lang.settings.extra_url
type: text
span: left
lastmod:
label: golem15.sitemap::lang.settings.extra_url_lastmod
comment: golem15.sitemap::lang.settings.extra_url_lastmod_comment
type: text
span: right
images_enabled:
label: golem15.sitemap::lang.settings.images_enabled
comment: golem15.sitemap::lang.settings.images_enabled_comment
type: switch
default: true
span: full
tab: golem15.sitemap::lang.settings.tab_media
news_enabled:
label: golem15.sitemap::lang.settings.news_enabled
comment: golem15.sitemap::lang.settings.news_enabled_comment
type: switch
default: false
span: full
tab: golem15.sitemap::lang.settings.tab_media
news_publication:
label: golem15.sitemap::lang.settings.news_publication
comment: golem15.sitemap::lang.settings.news_publication_comment
type: text
span: left
tab: golem15.sitemap::lang.settings.tab_media
trigger:
action: hide
field: news_enabled
condition: unchecked
# Taglist options are a fixed list, so the article types and their
# categories are listed by the news_sources partial below instead.
news_sources:
label: golem15.sitemap::lang.settings.news_sources
comment: golem15.sitemap::lang.settings.news_sources_comment
type: taglist
mode: array
span: right
tab: golem15.sitemap::lang.settings.tab_media
trigger:
action: hide
field: news_enabled
condition: unchecked
_news_sources:
type: partial
path: news_sources
span: full
tab: golem15.sitemap::lang.settings.tab_media
trigger:
action: hide
field: news_enabled
condition: unchecked
indexnow_enabled:
label: golem15.sitemap::lang.settings.indexnow_enabled
comment: golem15.sitemap::lang.settings.indexnow_enabled_comment
type: switch
default: false
span: full
tab: golem15.sitemap::lang.settings.tab_indexnow
_indexnow_status:
type: partial
path: indexnow_status
span: full
tab: golem15.sitemap::lang.settings.tab_indexnow
# No column: the controller lists it in FormVirtualFields and generates
# a new key on save when it is checked.
indexnow_new_key:
label: golem15.sitemap::lang.settings.indexnow_new_key
comment: golem15.sitemap::lang.settings.indexnow_new_key_comment
type: checkbox
default: false
span: full
tab: golem15.sitemap::lang.settings.tab_indexnow
trigger:
action: hide
field: indexnow_enabled
condition: unchecked