features/opengraph/8 #12

Merged
Shikiryu merged 4 commits from features/opengraph/8 into main 2020-07-27 12:02:58 +02:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit 87b71213eb - Show all commits

View File

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Home;
use Artesaos\SEOTools\Traits\SEOTools as SEOToolsTrait;
use DateTime;
class PublicController extends Controller
{
@ -18,6 +19,10 @@ class PublicController extends Controller
->addImages(array_map(static function($picture) {
return asset($picture);
}, $home->pictures));
$this->seo()
->opengraph()
->addProperty('article:published_time', $home->created_at->format(DateTime::ATOM))
->addProperty('article:author', 'Shikiryu');
return view('public.view', ['home' => $home]);
}

View File

@ -40,7 +40,7 @@ return [
'description' => false,
'url' => false, // Set null for using Url::current(), set false to total remove
'type' => 'article',
'site_name' => false,
'site_name' => 'Le projet Bretagne',
'images' => [],
],
],