Skip to content

Commit 79ef2d3

Browse files
committed
better config
1 parent 6ba6689 commit 79ef2d3

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

config/seo.php

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,59 @@
33
// config for Elegantly/Seo
44
return [
55

6+
/*
7+
|--------------------------------------------------------------------------
8+
| Default Title
9+
|--------------------------------------------------------------------------
10+
|
11+
| This is the default value used for <title>, "og:title", "twitter:title"
12+
|
13+
*/
614
'title' => env('APP_NAME', 'Laravel'),
715

16+
/*
17+
|--------------------------------------------------------------------------
18+
| Default Description
19+
|--------------------------------------------------------------------------
20+
|
21+
| This is the default value used for <meta name="description">, <meta property="og:description">, <meta name="twitter:description">
22+
|
23+
*/
824
'description' => null,
925

26+
/*
27+
|--------------------------------------------------------------------------
28+
| Default Image path
29+
|--------------------------------------------------------------------------
30+
|
31+
| This is the default value used for <meta property="og:image">, <meta name="twitter:image">
32+
| You can use relative path like "/opengraph.png" or url like "https://example.com/opengraph.png"
33+
|
34+
*/
35+
'image' => null,
36+
37+
/*
38+
|--------------------------------------------------------------------------
39+
| Default Robots
40+
|--------------------------------------------------------------------------
41+
|
42+
| This is the default value used for <meta name="robots">
43+
| See Google documentation here: https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag?hl=fr#directives
44+
|
45+
*/
1046
'robots' => 'max-snippet:-1,max-image-preview:large,max-video-preview:-1',
1147

48+
/*
49+
|--------------------------------------------------------------------------
50+
| Default Sitemap path
51+
|--------------------------------------------------------------------------
52+
|
53+
| This is the default value used for <link rel="sitemap">
54+
| You can use relative path like "/sitemap.xml" or url like "https://example.com/sitemap.xml"
55+
|
56+
*/
1257
'sitemap' => null,
1358

14-
'image' => null,
59+
1560

1661
];

src/OpenGraph/Verticals/Profile.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Elegantly\Seo\OpenGraph\Verticals;
4+
5+
/**
6+
* @see https://ogp.me/
7+
*/
8+
class Profile extends Vertical
9+
{
10+
public string $type = 'profile';
11+
12+
/**
13+
* @param null|'male'|'female' $gender
14+
*/
15+
public function __construct(
16+
public ?string $first_name = null,
17+
public ?string $last_name = null,
18+
public ?string $username = null,
19+
public ?string $gender = null,
20+
) {
21+
//
22+
}
23+
}

0 commit comments

Comments
 (0)