feat: noindex paths from the route report leave the sitemaps (tracer)
The route report takes an optional noindex list of static paths. When the key is present the stored set (golem15_seo_noindex_paths) is replaced, and the sitemap filter leaves those paths out with the reason noindex; a changed set asks the sitemap for a debounced rebuild through contract.Rebuilder. A listed noindex address without a CMS record now names sitemap_update_settings, or fix: code without the sitemap plugin.
This commit is contained in:
28
updates/202611040001_create_golem15_seo_noindex_paths.go
Normal file
28
updates/202611040001_create_golem15_seo_noindex_paths.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package updates
|
||||
|
||||
import (
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// createNoindexPaths creates golem15_seo_noindex_paths (P33-58): the static
|
||||
// paths the frontend's route report names noindex, normalised like the
|
||||
// reported routes. The sitemap filter leaves them out of the sitemaps.
|
||||
var createNoindexPaths = []*gormigrate.Migration{
|
||||
{
|
||||
ID: "202611040001_create_golem15_seo_noindex_paths",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
return tx.Exec(`CREATE TABLE golem15_seo_noindex_paths (
|
||||
path TEXT PRIMARY KEY,
|
||||
reported_at TIMESTAMP(0) NOT NULL
|
||||
)`).Error
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return tx.Exec(`DROP TABLE IF EXISTS golem15_seo_noindex_paths`).Error
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
Register(createNoindexPaths...)
|
||||
}
|
||||
Reference in New Issue
Block a user