Skip to content

SEO

Renders the document title and SEO / social sharing head tags for a page.

The component emits the <title>, meta description, canonical URL, noindex robots directive and Open Graph / Twitter card tags. Optional properties are only emitted when a value is provided.

Basic Usage

blade
<x-basekit-ui::seo
    title="Pricing"
    site-name="Acme"
    description="Simple, transparent pricing for teams of every size."
    canonical="{{ request()->url() }}"
    og-type="website"
    og-image="{{ asset('images/og.png') }}"
/>

Props

PropTypeDefaultDescription
titlestring''Page title (suffixed with site-name)
site-namestring''Site name used in the title and og tags
descriptionstringnullMeta description
canonicalstringnullCanonical URL
og-typestring'website'Open Graph type (website, article, …)
og-imagestringnullOpen Graph / Twitter share image
noindexbooleanfalseEmit robots: noindex, follow

Title Suffix

The final document title is {title} · {siteName}. When title is empty the site name is used on its own:

blade
<x-basekit-ui::seo title="Pricing" site-name="Acme" />
{{-- <title>Pricing · Acme</title> --}}

No-Index Pages

Pass :noindex="true" for pages that should not be indexed:

blade
<x-basekit-ui::seo title="Login" site-name="Acme" :noindex="true" />

Configuration

Configure in config/basekit-laravel-ui.php:

php
'seo' => [
    'enabled' => true,
],

Released under the MIT License.