Global Configuration
Most of the SEO Audit configuration can be done in your blueprints per view button or section. Additionally, you can configure internal handling of the plugin globally in your config.php file.
Global Defaults
logLevel String
Default logging level for the analysis. Options: error, warn (default), info, and debug. Inspect the browser console to see the logs.
return [
'johannschopplich.seo-audit' => [
'logLevel' => 'info'
]
];
Proxy Configuration
For specific use cases, such as running Kirby inside Docker containers, you can adjust the proxy configuration globally. The proxy only runs when the preview URL's origin differs from the Panel's – a same-origin preview URL is fetched by the browser, and none of the options below apply.
urlResolver Closure
The urlResolver property accepts a closure that receives the preview URL and returns the URL the proxy fetches instead. It must return a non-empty string, otherwise the request fails. This is useful if you run Kirby inside Docker containers and need to point the URL at the host machine:
return [
'johannschopplich.seo-audit' => [
'proxy' => [
'urlResolver' => function (string $url) {
$uri = new \Kirby\Http\Uri($url);
if ($uri->domain() === '127.0.0.1:3000') {
$uri->setHost('host.docker.internal');
}
return $uri->toString();
}
]
]
];
params Array
Any parameter supported by Kirby's Remote::request() method can be passed to the proxy API. This is useful if you need to authenticate against the preview URL:
return [
'johannschopplich.seo-audit' => [
'proxy' => [
'params' => [
'basicAuth' => 'user:password'
]
]
]
];
Custom Plugin Translations
If you prefer to overwrite the default translations of the plugin, you can do so by adding translations for your language in the languages directory of your Kirby installation.
translations.php for the full list of translation keys.For example, to change the translation of the analyze button to Check SEO in English, append the following translations array to the languages/en.php file:
return [
'code' => 'en',
'name' => 'English',
// ... Other language configuration
'translations' => [
'johannschopplich.seo-audit.analyze' => 'Check SEO'
]
];