```
--------------------------------
### Verify content is in initial HTML
Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Agent-quickstart
Third verification step. The heading must be in the source, not injected later. This is the whole SEO argument.
```bash
# 3. Content is in the initial HTML, with no JavaScript
curl -s http://localhost:8000/ | grep -oE '{{ $page->data('excerpt', $locale) }}
From AED {{ number_format((float) $page->data('starting_price')) }}
``` -------------------------------- ### Verify Atelier routes with route:list Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Installation Lists routes filtered by 'atelier' to confirm the preview route, editor page, and public page routes are registered. If the preview iframe is blank or unstyled, check step 4 and whether a stale public/hot file points Vite at a non-running dev server. ```bash php artisan route:list | grep atelier ``` -------------------------------- ### Generate signed preview URL and route with middleware Source: https://github.com/abdulkader-safi/filament-atelier/blob/main/Docs/research/preview-drafts-gsap-seo.md Creates a temporary signed URL for a page preview that expires in 30 minutes. The route uses the 'signed' middleware to reject tampered or expired links with a 403. Use temporarySignedRoute over signedRoute to ensure links expire. ```php $url = URL::temporarySignedRoute('pages.preview', now()->addMinutes(30), ['page' => $page->id]); // routes/web.php Route::get('/preview/{page}', PreviewController::class) ->name('pages.preview') ->middleware('signed'); ``` -------------------------------- ### Generate a custom Filament page with artisan Source: https://github.com/abdulkader-safi/filament-atelier/blob/main/Docs/research/filament-plugin-development.md Run this command to scaffold a new custom page class. The generated file will be placed in the Filament pages directory. ```bash php artisan make:filament-page VisualBuilder ``` -------------------------------- ### Short form sitemap source Source: https://github.com/abdulkader-safi/filament-atelier/wiki/SEO Returns a list of plain URL strings for fixed routes. Suitable for a handful of static URLs. ```php ->sitemap([ fn () => [ route('pricing'), route('contact'), ], ]) ``` -------------------------------- ### Create and publish a page from code Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Publishing Creates a Page with draft content, sets slugs for English and Arabic, and publishes it. Useful for seeders or standing up a client site. setSlugs() generates a slug from the title when passed an empty string and writes a 301 from the old URL on slug changes. ```php use Safi\Atelier\Models\Page; $page = Page::create([ 'title' => 'Pricing', 'draft_content' => [[ 'id' => 'b_hero', 'type' => 'hero', 'attributes' => ['heading' => ['en' => 'Pricing', 'ar' => 'الأسعار']], 'children' => [], ]], ]); $page->setSlugs(['en' => 'pricing', 'ar' => 'as3ar']); $page->publish(); ``` -------------------------------- ### Enable experimental menus per panel with AtelierPlugin::make()->experimental() Source: https://github.com/abdulkader-safi/filament-atelier/blob/main/README.md Per-panel override to enable the experimental menu manager. This overrides the config setting. Use AtelierPlugin::make()->experimental(['menus' => true]). ```php AtelierPlugin::make()->experimental(['menus' => true]) ``` -------------------------------- ### Publish Atelier Blade views Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Configuration Run this artisan command to copy all package Blade views into resources/views/vendor/atelier/. After publishing, rebuild your CSS because the @source line pointing at the vendor directory no longer covers the published views. ```bash php artisan vendor:publish --tag=filament-atelier-views ``` -------------------------------- ### Register layouts with AtelierPlugin Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Layouts Shows how to register layouts using the AtelierPlugin's layouts method. The long form takes 'label', 'view', and optional 'description'; the short form is just the view name, with the label derived from the key. Registering layouts does not force every page to pick one; empty means the site-wide 'atelier.layout'. ```php use Safi\Atelier\AtelierPlugin; use Safi\Atelier\Blocks\DefaultBlocks; ->plugins([ AtelierPlugin::make() ->blocks(DefaultBlocks::all()) ->layouts([ 'site' => [ 'label' => 'Navbar and footer', 'view' => 'layouts.site', 'description' => 'The marketing shell. Full-width sections.', ], 'docs' => [ 'label' => 'Sidebar', 'view' => 'layouts.docs', ], 'bare' => 'layouts.bare', ]), ]) ``` -------------------------------- ### Register Atelier plugin in panel provider Source: https://github.com/abdulkader-safi/filament-atelier/blob/main/Docs/installation.md Add this to your panel provider's plugins array to register the Atelier plugin with the default blocks. DefaultBlocks::all() is the set Atelier ships; pass your own array to cherry-pick blocks or add custom classes. ```php use Safi\Atelier\AtelierPlugin; use Safi\Atelier\Blocks\DefaultBlocks; ->plugins([ AtelierPlugin::make() ->blocks(DefaultBlocks::all()), ]) ``` -------------------------------- ### Enable experimental features in config Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Configuration Configuration array to enable experimental features. The 'menus' flag is off by default and can be overridden per panel with AtelierPlugin::make()->experimental(['menus' => true]). ```php 'experimental' => [ 'menus' => false, ], ``` -------------------------------- ### Register Atelier components in panel provider Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Configuration Use AtelierPlugin::make() in your panel provider to register block types, layout shells, and extra sitemap URLs. Blocks and layouts are code-based, while sitemap URLs come from external sources. ```php AtelierPlugin::make() ->blocks(DefaultBlocks::all()) // block types ->layouts([...]) // shells a page can pick ->sitemap([...]); // URLs from outside Atelier ``` -------------------------------- ### Include package menu partial Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Menus Fastest way to render a menu using the package's Blade partial. Pass the location and locale. The partial outputs bare markup with nested lists and aria-current attributes. ```blade @include('atelier::partials.menu', ['location' => 'primary', 'locale' => $locale]) ``` -------------------------------- ### Create storage symlink for public disk Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Configuration Required when using the default public disk. Without the symlink, images in the builder and live site are broken with no log entry. ```bash php artisan storage:link ``` -------------------------------- ### Call exposed Livewire method from Alpine Source: https://github.com/abdulkader-safi/filament-atelier/blob/main/Docs/research/filament-plugin-development.md JavaScript call to the exposed snapToGrid method using $wire.callSchemaComponentMethod with the field key and parameters. ```js this.result = await $wire.callSchemaComponentMethod(@js($getKey()), 'snapToGrid', { coords }) ``` -------------------------------- ### Verify SEO tags Source: https://github.com/abdulkader-safi/filament-atelier/wiki/Agent-quickstart Sixth verification step. Expect title, canonical link, and og:title tags. ```bash # 6. SEO tags curl -s http://localhost:8000/ | grep -oE '