Files
sm-seo-plugin/admin_navigation.go
Jakub Zych 51413fbda4 feat: robots.txt editor and tester screen
- golem15.seo.robots singleton (UI-SPEC C10): staging callout and the
  served file (P4); the plugin's own extension adds the editor, the
  tester and the AI bots tab, saved to the robots row with history
- field type robotstxt (E4, live lint, size meter; Decode refuses over
  500 KB) and widget golem15-seo-robotstester (E5) on robots_test, which
  tests the unsaved text and switches through grobotstxt
- saving rules that block a noindex address answers robots.blocks_noindex
2026-10-27 11:51:41 +01:00

60 lines
1.8 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: "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,
},
},
}}
}
var _ pact.HasNavigation = (*Plugin)(nil)