Blog routes, SEO tags and scheduling
Updated
Public routes (opt-in)
'routes' => ['enabled' => true, 'prefix' => 'blog', 'layout' => 'layouts.app'],
Gives you /blog, /blog/{slug}, /blog/category/{slug}, /blog/tag/{slug}, /blog/feed, and the
Blade components <x-ai-blog::meta-tags>, <x-ai-blog::structured-data>, <x-ai-blog::post-body>.
Your layout needs @yield('title'), @yield('content') and @stack('head'); the pages put their tags in the stack.
What the pages send to search engines
- Post pages: a canonical URL (the post's own address, or its
canonical_urlwhen you set one),og:andtwitter:cards with an absolute image URL,article:published_timeandarticle:modified_time, arobotstag that allows large image previews, an RSS link, andBlogPostingJSON-LD with the page address and publisher. A## Question?heading followed by an answer addsFAQPageJSON-LD. - Index, category and tag pages: a description, a canonical URL,
prev/nextlinks, an RSS link and a distinct title on every page of results ("Blog — Page 2 — My Site"). - Feed: RSS 2.0 with language, last build date and permalink GUIDs.
- Tags with nothing to say are left out rather than sent empty: a post with no description gets no
descriptiontag. Setai-blog.seo.description(orAI_BLOG_SEO_DESCRIPTION) for the blog's own description.
Scheduler
// routes/console.php
Schedule::command('ai-blog:publish-scheduled')->everyMinute();