Skip to content

codedor/filament-seo

Repository files navigation

Package to manage SEO tags for models and routes in Filament

The SEO package for Laravel and Filament is a tool that simplifies the management of Open Graph (OG) and meta tags for your Eloquent models and routes. With this package, you can effortlessly define and customize essential metadata such as titles, descriptions and images, optimizing how your content appears in search results and on social media platforms. Integrated with Filament, the package offers a user-friendly interface for easy configuration, empowering you to enhance your website's SEO capabilities and drive more organic traffic to your site.

Installation

You can install the package via composer:

composer require codedor/filament-seo

You can publish and run the migrations with:

php artisan vendor:publish --tag="filament-seo-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="filament-seo-config"

This is the contents of the published config file:

use Codedor\Seo\Tags\Meta;
use Codedor\Seo\Tags\OgUrl;
use Codedor\Seo\Tags\OpenGraph;
use Codedor\Seo\Tags\OpenGraphImage;

// config for Codedor/Seo
return [
    'models' => [
        'seo-route' => \Codedor\Seo\Models\SeoRoute::class,
    ],
    'default' => [
        'title_og' => [
            'type' => OpenGraph::class,
            'name' => 'title',
            'content' => config('app.name'),
        ],
        'title_meta' => [
            'type' => Meta::class,
            'name' => 'title',
            'content' => config('app.name'),
        ],
        'description_og' => [
            'type' => OpenGraph::class,
            'name' => 'description',
            'content' => '',
        ],
        'description_meta' => [
            'type' => Meta::class,
            'name' => 'description',
            'content' => '',
        ],
        'image_og' => [
            'type' => OpenGraphImage::class,
            'name' => 'image',
            'content' => '',
        ],
        'type_og' => [
            'type' => OpenGraph::class,
            'name' => 'type',
            'content' => 'website',
        ],
        'url_og' => [
            'type' => OgUrl::class,
            'name' => 'url',
            'content' => '',
        ],
    ],
];

Usage

// Filament
\Codedor\Seo\Filament\SeoCard::make();

// Front-end
@seo()

Documentation

For the full documentation, check here.

Testing

vendor/bin/pest

Changelog

Please see CHANGELOG for more information on what has changed recently.

Upgrading

Please see UPGRADING for more information on how to upgrade to a new version.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

Manage SEO tags for models in Filament

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages