We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing $kirby to pedroborges.meta-tags.default|templates is helpful.
$kirby
pedroborges.meta-tags.default|templates
I.e. to differ metadata on the route used:
<?php $config = array( // ... 'pedroborges.meta-tags.default' => function ($page, $site, $kirby) { $template = $page->template()->name(); if ($template == 'blog') { $isArchive = $kirby->route()->attributes()['pattern'] == 'blog/(:any)'; if ($isArchive) { $description = '<Category Archive Description>'; } else { $description = '<Blog Index Description>'; } } return [ // ... 'meta' => [ 'description' => $description ], ] );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Passing
$kirby
topedroborges.meta-tags.default|templates
is helpful.I.e. to differ metadata on the route used:
The text was updated successfully, but these errors were encountered: