Files
sm-seo-plugin/admin_navigation.go
Jakub Zych 9e802ec850 feat: page registry with its admin screen and signpost type
- golem15_seo_pages (migration 202610280002): the site's own frontend pages
  with an address and a name per locale, kind, origin, parent, content date
  and note; settings routes_reported_at
- SEO > Pages (golem15.seo.pages) after URL rules: list with kind, origin
  and missing filters and the missing row state, form with the P9 partial;
  the plugin's form extension saves the address and name per locale and
  refuses url_required, url_invalid, url_taken and url_owned
- menu item type seo-page with a content descriptor, so each page gets
  the SEO tab, resolves ok and is listed in the sitemaps grouped by kind
  (pages, offers, services, landing-pages, titled per locale)
- management API GET/POST /_seo/api/v1/pages, PUT/DELETE /pages/{id} and
  the MCP tools seo_list_pages, seo_create_page, seo_update_page,
  seo_delete_page (in this commit because the operations parity test maps
  every Pages operation to its tool)
2026-11-04 13:20:45 +01:00

74 lines
2.2 KiB
Go

package seo
import (
"git.golem15.com/golem15/sm-seo-plugin/controllers"
"git.golem15.com/golem15/summercms/modules/pact"
)
// Navigation registers the SEO main item (UI-SPEC C2) behind
// golem15.seo.manage. It lands on Redirects; each side-menu entry is added
// when its controller exists, in the C2 order.
func (*Plugin) Navigation() []pact.NavigationItem {
return []pact.NavigationItem{{
Code: "seo",
Label: "golem15.seo::lang.nav.seo",
Icon: "search",
Permissions: []string{controllers.PermissionManage},
Order: 600,
Controller: controllers.RedirectsControllerID,
SideMenu: []pact.NavigationItem{
{
Code: "redirects",
Label: "golem15.seo::lang.nav.redirects",
Icon: "arrow-right",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.RedirectsControllerID,
},
{
Code: "notfound",
Label: "golem15.seo::lang.nav.notfound",
Icon: "triangle-alert",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.NotFoundControllerID,
},
{
Code: "rules",
Label: "golem15.seo::lang.nav.rules",
Icon: "link",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.RulesControllerID,
},
{
Code: "pages",
Label: "golem15.seo::lang.nav.pages",
Icon: "files",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.PagesControllerID,
},
{
Code: "robots",
Label: "golem15.seo::lang.nav.robots",
Icon: "file-text",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.RobotsControllerID,
},
{
Code: "history",
Label: "golem15.seo::lang.nav.history",
Icon: "clock",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.HistoryControllerID,
},
{
Code: "transfer",
Label: "golem15.seo::lang.nav.transfer",
Icon: "download",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.TransferControllerID,
},
},
}}
}
var _ pact.HasNavigation = (*Plugin)(nil)