1
0
Fork 0
mirror of https://github.com/archtechx/laravel-seo.git synced 2025-12-12 09:54:03 +00:00

OpenGraph improvements (#17)

* Allow setting tag('og:title', ...)

* og:type overriding

* Add type()
This commit is contained in:
Samuel Štancl 2022-03-30 18:01:21 +02:00 committed by GitHub
parent 2480e532bf
commit 754b3936d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 5 deletions

View file

@ -1,14 +1,22 @@
@if(seo('title'))
<title>@seo('title')</title>
<meta property="og:title" content="@seo('title')" />
@unless(seo()->hasTag('og:title'))
{{-- If an og:title tag is provided directly, it's included in the @foreach below --}}
<meta property="og:title" content="@seo('title')" />
@endunless
@endif
@if(seo('description'))
@if(seo('description'))
<meta property="og:description" content="@seo('description')" />
<meta name="description" content="@seo('description')" />
@endif
<meta property="og:type" content="website" />
@if(seo('type'))
<meta property="og:type" content="@seo('type')" />
@else
<meta property="og:type" content="website" />
@endif
@if(seo('site')) <meta property="og:site_name" content="@seo('site')"> @endif