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
This commit is contained in:
10
controllers/robots/_robots_served.htm
Normal file
10
controllers/robots/_robots_served.htm
Normal file
@@ -0,0 +1,10 @@
|
||||
{{- with .Data -}}
|
||||
<div class="summer-markdown">
|
||||
<p>{{ trans "golem15.seo::lang.robots.served_comment" }}</p>
|
||||
<pre>{{ .Served }}</pre>
|
||||
{{- if .Staging }}
|
||||
<p><strong>{{ trans "golem15.seo::lang.robots.served_production" }}</strong></p>
|
||||
<pre>{{ .Production }}</pre>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
6
controllers/robots/_staging.htm
Normal file
6
controllers/robots/_staging.htm
Normal file
@@ -0,0 +1,6 @@
|
||||
{{- if .Data.Staging -}}
|
||||
<div class="summer-callout summer-callout--warning" role="status">
|
||||
<p class="summer-callout__title">{{ trans "golem15.seo::lang.robots.staging_title" }}</p>
|
||||
<p class="summer-callout__text">{{ trans "golem15.seo::lang.robots.staging_text" }}</p>
|
||||
</div>
|
||||
{{- end -}}
|
||||
13
controllers/robots/config_form.yaml
Normal file
13
controllers/robots/config_form.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# robots.txt singleton (UI-SPEC C10): the singleton footer, no delete.
|
||||
name: golem15.seo::lang.robots.title
|
||||
form: ~/plugins/golem15/seo/models/robots/fields.yaml
|
||||
modelClass: Golem15\SEO\Models\Robots
|
||||
defaultRedirect: golem15/seo/robots
|
||||
|
||||
update:
|
||||
redirect: golem15/seo/robots
|
||||
redirectClose: golem15/seo/redirects
|
||||
|
||||
messages:
|
||||
update: golem15.seo::lang.robots.title
|
||||
saved: backend::lang.messages.form.saved
|
||||
Reference in New Issue
Block a user