# Builder SEO

SEO field group, global SEO settings, schema.org output, and redirects for the Builder admin panel.

## Requirements

- PHP 8.4+
- `builder/core` v2+
- `spatie/schema-org` (installed automatically)

## Installation

```bash
composer require builder/seo
php artisan vendor:publish --tag=seo-config
php artisan migrate
php artisan builder:link
```

Add the SEO field group to a resource section:

```php
use Builder\Seo\Support\SeoField;

Section::make('seo')->label('SEO')->fields([
    ...SeoField::group(),
]);
```

## Development

```bash
cd packages/seo
composer install
pnpm install
pnpm run dev
```

## Testing

```bash
composer test
```

## Releasing a new version

Releases are automated by the **Release** GitHub Actions workflow — you no
longer build assets or create tags by hand.

1. Make sure `main` is up to date and green.
2. Trigger the workflow with the new version number:
   - GitHub UI: **Actions → Release → Run workflow**, enter e.g. `1.2.3`
   - CLI: `gh workflow run release.yml -f version=1.2.3`

The workflow runs `composer test`, builds the production assets, commits them
into the release tag, pushes the tag and creates the GitHub Release. The build
output is **not** tracked on `main` — it lives only inside release tags.

> Built assets (`public/assets`, `public/.vite`) and `public/hot` are
> gitignored; never commit them by hand.
