The package is configured via a configuration file. Below are the available keys for each generator:
MetaGenerator
title: Default title.titleTemplate: Template for the title (e.g., {title} - {app_name}).description: Default description.keywords: Array of keywords.canonicalEnabled: Boolean.canonical: URL or null.robots: Array of robots settings.custom: Key-value pairs for custom meta tags.
TwitterGenerator
enabled: Boolean.site: @twitterUsername.creator: @twitterUsername.title, description, image: Default values.
OpenGraphGenerator
enabled: Boolean.site: Site name.type: OG type (e.g., website).title, description, images, audio, videos, url, locale: Default values.determiner: OG determiner.alternateLocales: Array of locales.custom: Key-value pairs.
JsonLdGenerator
enabled: Boolean.pretty: Boolean (uses APP_DEBUG).type: Schema type (e.g., WebPage).name, description, images, url, custom: Default values.place-on-graph: Boolean (determines if it's automatically added to the graph).
return [
'generators' => [
Generators\MetaGenerator::class => [
'title' => env('APP_NAME'),
'titleTemplate' => '{title} - '.env('APP_NAME'),
'description' => '',
'keywords' => [],
'canonicalEnabled' => true,
'canonical' => null,
'robots' => [],
'custom' => [],
],
Generators\TwitterGenerator::class => [
'enabled' => true,
'site' => '',
'creator' => '',
'title' => '',
'description' => '',
'image' => '',
],
Generators\OpenGraphGenerator::class => [
'enabled' => true,
'site' => env('APP_NAME'),
'type' => 'website',
'title' => '',
'description' => '',
'images' => [],
'audio' => [],
'videos' => [],
'determiner' => '',
'url' => null,
'locale' => '',
'alternateLocales' => [],
'custom' => [],
],
Generators\JsonLdGenerator::class => [
'enabled' => true,
'pretty' => env('APP_DEBUG'),
'type' => 'WebPage',
'name' => '',
'description' => '',
'images' => [],
'url' => null,
'custom' => [],
'place-on-graph' => true,
],
],
'sync' => [
'url-canonical' => true,
'keywords-tags' => false,
],
];