View Button & Field Configuration
Add Kirby SEO Audit to a Panel view as a view button (recommended) or a field. Both share their configuration properties and can be used together.
View Button Configuration
Add the seo-audit view button to a site or page blueprint, alongside default buttons such as preview and settings. The analysis needs an HTML preview URL, so file views are out of scope.
Our Studio
Clicking the SEO Audit view button runs the analysis for the current page and opens the report in a dialog. The dot on the button is the page's rating.
Basic Setup
To add the seo-audit view button to a Panel view, set the buttons option in the corresponding blueprint. Listing buttons replaces Kirby's defaults, so name the ones you want to keep – the default set differs per model. seo-audit goes wherever it suits the view:
buttons:
- seo-audit
- open
- preview
- languages
buttons:
- seo-audit
- open
- preview
- settings
- languages
- status
Add the Button to Every View
To add the button to the site view and every page view without editing each blueprint, set Kirby's panel.viewButtons option. It replaces the defaults the same way a blueprint list does, and a blueprint that sets buttons wins over it:
return [
'panel' => [
'viewButtons' => [
'site' => ['seo-audit', 'open', 'preview', 'languages'],
'page' => ['seo-audit', 'open', 'preview', 'settings', 'languages', 'status']
]
]
];
To pass props such as keyphraseField, give seo-audit a key and keep the other buttons as plain names: 'seo-audit' => ['keyphraseField' => 'metaKeyphrase']. A query in keyphrase or synonyms resolves only in the blueprint.
Pass Props to the Button
To pass properties, write buttons as an object. seo-audit takes the properties, and every other button you keep is set to true:
buttons:
seo-audit:
keyphraseField: metaKeyphrase
assessments:
- metaDescriptionKeyword
- metaDescriptionLength
- titleWidth
- images
- textLength
contentSelector: "#main"
open: true
preview: true
settings: true
languages: true
status: true
Field Configuration
The SEO Audit field shows the report inline, among the page's fields, instead of in a dialog.
Basic Setup
fields:
seoAudit:
type: seo-audit
The field renders an Analyze button:
SEO Audit ×
Click it to run the analysis. The report appears below the button:
SEO Audit ×
Good
OK
Needs improvement
Published version · 9/1/26, 8:40 AM
Shared Properties
Most snippets below show only the property line. Wrap them under buttons.seo-audit (view button) or under fields.<name> with type: seo-audit (field), as in the examples above.
Properties marked Query accept Kirby's query language, so {{ page.title }} resolves against the current page. Single braces count as a query too, so { page.title } resolves the same way and a literal {…} in the value is replaced – by nothing when the query finds nothing.
label String
Custom label for the view button or the field. Both fall back to the plugin's own label in the current Panel language – "SEO Audit" in English.
label: SEO Report
keyphraseField String
Names the field of the current page that holds the keyphrase – the term the editor wants the page to rank for in Google.
buttons:
seo-audit:
# Reference the keyphrase field for the view button
keyphraseField: metaKeyphrase
fields:
# Define the keyphrase field
metaKeyphrase:
label: SEO Keyphrase
type: text
help: The keyphrase you want this page to rank for
seoAudit:
type: seo-audit
# Reference the keyphrase field for the SEO Audit field
keyphraseField: metaKeyphrase
While the page supplies no keyphrase from keyphraseField or keyphrase, every keyphrase assessment is skipped, unless the assessments property lists it.
keyphrase String Query
Sets the keyphrase in the blueprint, so the editor does not enter one. Set alongside keyphraseField, it wins over the field's value.
keyphrase: editorial design
A Kirby query resolves against the current page, so the keyphrase can follow the content:
keyphrase: "{{ page.title.value }}"
synonymsField String
Names the field of the current page that holds synonyms of the keyphrase, so the text does not have to repeat the keyphrase over and over. Reference a tags field, such as metaSynonyms, on the view button and the field the way keyphraseField does.
synonyms Array Query
Sets the synonyms in the blueprint, so the editor does not fill in a field. Like keyphrase, it wins over its field.
keyphrase: editorial design
synonyms:
- book design
- typography
- publication design
A Kirby query is only resolved in a string, and the result is split on commas. In list form every entry is used verbatim, so a {{ }} placeholder inside a list stays unresolved:
synonyms: "{{ page.metaSynonyms }}"
assessments Array
Limits the report to the listed assessments; without it, all of them are enabled. The keys are listed in Assessments for SEO and Readability. With a single readability key in the list, Readability shows as "Not available".
assessments:
# Select the assessments you want to include
- metaDescriptionKeyword
- metaDescriptionLength
- titleWidth
- images
- textLength
- imageKeyphrase
contentSelector String
A CSS selector for the part of the page to analyze. Use it to keep navigation, footers, or sidebars out of the analysis, so content that repeats on every page is not flagged.
Default: body
To analyze the content of one element only:
contentSelector: "#main"
The selector scopes the plugin's custom assessments too, so an H1 outside the selected elements is reported as missing.
The selector can match several elements. To see the extracted HTML in the browser console, set logLevel to info or debug:
contentSelector: ".seo-audit-allowed > *:not(.seo-audit-ignore)"
logLevel: info
links Boolean
The results link to articles on Yoast.com that explain each assessment. Set links to false to remove them – for privacy reasons, or to keep the editor in the Panel.
Default: true
links: false
analyzeOn String | Boolean
Turns the analysis after publishing on with publish or off with false for this view button or field. A blueprint value overrides the global option. An unknown value shows an error in place of the field.
analyzeOn: publish
logLevel String
Overrides the global logLevel – error, warn (default), info, or debug – for this view button or field. An unknown level shows an error in place of the field.
logLevel: info
View Button-Only Properties
theme String
Sets the color theme of the button.
Default: positive-icon
Options: Any theme Kirby's button component accepts, including the filled variants without the -icon suffix – see Kirby's UI reference.
buttons:
seo-audit:
theme: positive
Field-Only Properties
persisted Boolean
By default, reports are saved to the browser's local storage, one per field, page, and language, so an editor can close the Panel and return later without rerunning the analysis. The rating the plugin keeps on the server is unaffected by this property.
To stop saving the report:
type: seo-audit
persisted: false