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

Add support keywords meta tag (#29)

* Add support 'keywords' meta tag

* update

* update
This commit is contained in:
Ngô Quốc Đạt 2023-04-24 10:18:46 +07:00 committed by GitHub
parent 3a17c8ee11
commit 567a7b09ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 7 deletions

View file

@ -0,0 +1,2 @@
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}">
<link rel="icon" type="image/png" href="{{ asset('favicon.png') }}">

View file

@ -0,0 +1,6 @@
<meta name="twitter:card" content="summary_large_image">
@if(seo('twitter.creator')) <meta name="twitter:creator" content="@seo('twitter.creator')"> @endif
@if(seo('twitter.site')) <meta name="twitter:site" content="@seo('twitter.site')"> @endif
@if(seo('twitter.title')) <meta name="twitter:title" content="@seo('twitter.title')"> @endif
@if(seo('twitter.description')) <meta name="twitter:description" content="@seo('twitter.description')"> @endif
@if(seo('twitter.image')) <meta name="twitter:image" content="@seo('twitter.image')" /> @endif

View file

@ -0,0 +1,42 @@
@if(seo('title'))
<title>@seo('title')</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'))
<meta property="og:description" content="@seo('description')" />
<meta name="description" content="@seo('description')" />
@endif
@if(seo('keywords'))
<meta name="keywords" content="@seo('keywords')" />
@endif
@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
@if(seo('locale')) <meta property="og:locale" content="@seo('locale')" /> @endif
@if(seo('image')) <meta property="og:image" content="@seo('image')" /> @endif
@if(seo('url'))
<meta property="og:url" content="@seo('url')" />
<link rel="canonical" href="@seo('url')" />
@endif
@foreach(seo()->tags() as $tag)
{!! $tag !!}
@endforeach
@foreach(seo()->extensions() as $extension)
<x-dynamic-component :component="$extension" />
@endforeach