Files
sm-seo-plugin/admin_navigation.go
Jakub Zych 49cc241f58 feat: internal links widget with counts and suggestions
- E10 golem15-seo-links in the SEO tab after the graph preview (types
  with a body): inbound and outbound counts from the last finished crawl,
  the orphan warning, up to 10 pages to link to (Copy address) and 10
  that could link here
- classes/linkgraph.go builds the report from the crawl's pages and
  links; the crawler's orphan suggestions share NormalText
- GET /_seo/api/v1/links and seo_get_link_suggestions; widget action
  seo_links mapped in AdminOperations
- element bundle rebuilt
2026-11-04 16:40:16 +01:00

96 lines
2.9 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,
},
// Auto-links, controller golem15.seo.autolinks (UI-SPEC C15).
{
Code: "autolinks",
Label: "golem15.seo::lang.nav.autolinks",
Icon: "wand-sparkles",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.AutolinksControllerID,
},
{
Code: "audit",
Label: "golem15.seo::lang.nav.audit",
Icon: "gauge",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.IssuesControllerID,
},
{
Code: "crawls",
Label: "golem15.seo::lang.nav.crawls",
Icon: "globe",
Permissions: []string{controllers.PermissionManage},
Controller: controllers.CrawlsControllerID,
},
{
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)