From 79ef2d3352e3b7d1cc9818abd7d5df6eba44795b Mon Sep 17 00:00:00 2001 From: Quentin Gabriele Date: Fri, 23 Aug 2024 12:37:06 +0200 Subject: [PATCH] better config --- config/seo.php | 47 ++++++++++++++++++++++++++++- src/OpenGraph/Verticals/Profile.php | 23 ++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/OpenGraph/Verticals/Profile.php diff --git a/config/seo.php b/config/seo.php index 8f36531..aef5432 100644 --- a/config/seo.php +++ b/config/seo.php @@ -3,14 +3,59 @@ // config for Elegantly/Seo return [ + /* + |-------------------------------------------------------------------------- + | Default Title + |-------------------------------------------------------------------------- + | + | This is the default value used for , "og:title", "twitter:title" + | + */ 'title' => env('APP_NAME', 'Laravel'), + /* + |-------------------------------------------------------------------------- + | Default Description + |-------------------------------------------------------------------------- + | + | This is the default value used for <meta name="description">, <meta property="og:description">, <meta name="twitter:description"> + | + */ 'description' => null, + /* + |-------------------------------------------------------------------------- + | Default Image path + |-------------------------------------------------------------------------- + | + | This is the default value used for <meta property="og:image">, <meta name="twitter:image"> + | You can use relative path like "/opengraph.png" or url like "https://example.com/opengraph.png" + | + */ + 'image' => null, + + /* + |-------------------------------------------------------------------------- + | Default Robots + |-------------------------------------------------------------------------- + | + | This is the default value used for <meta name="robots"> + | See Google documentation here: https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag?hl=fr#directives + | + */ 'robots' => 'max-snippet:-1,max-image-preview:large,max-video-preview:-1', + /* + |-------------------------------------------------------------------------- + | Default Sitemap path + |-------------------------------------------------------------------------- + | + | This is the default value used for <link rel="sitemap"> + | You can use relative path like "/sitemap.xml" or url like "https://example.com/sitemap.xml" + | + */ 'sitemap' => null, - 'image' => null, + ]; diff --git a/src/OpenGraph/Verticals/Profile.php b/src/OpenGraph/Verticals/Profile.php new file mode 100644 index 0000000..6a3b8c9 --- /dev/null +++ b/src/OpenGraph/Verticals/Profile.php @@ -0,0 +1,23 @@ +<?php + +namespace Elegantly\Seo\OpenGraph\Verticals; + +/** + * @see https://ogp.me/ + */ +class Profile extends Vertical +{ + public string $type = 'profile'; + + /** + * @param null|'male'|'female' $gender + */ + public function __construct( + public ?string $first_name = null, + public ?string $last_name = null, + public ?string $username = null, + public ?string $gender = null, + ) { + // + } +}