- 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
25 lines
792 B
Go
25 lines
792 B
Go
package seo
|
|
|
|
import (
|
|
"git.golem15.com/golem15/sm-seo-plugin/classes"
|
|
"git.golem15.com/golem15/sm-seo-plugin/controllers"
|
|
"git.golem15.com/golem15/summercms/modules/backpack"
|
|
"git.golem15.com/golem15/summercms/modules/pact"
|
|
)
|
|
|
|
// FormFieldTypes registers the SEO field types (classes.FieldTypes):
|
|
// seotext, mlseotext, seorobots, mlseorobots, seoimage and robotstxt.
|
|
// Their element bundle loads on every admin page, so the SEO tab works on
|
|
// other plugins' forms and the robots.txt tester element (E5) is defined
|
|
// wherever its widget renders.
|
|
func (p *Plugin) FormFieldTypes() []pact.FormFieldType {
|
|
return classes.FieldTypes(func() *backpack.App {
|
|
if p == nil {
|
|
return nil
|
|
}
|
|
return p.app
|
|
}, controllers.PermissionManage)
|
|
}
|
|
|
|
var _ pact.HasFormFieldTypes = (*Plugin)(nil)
|