Structured Data in Textstem: Automatic Schema.org Output and AI-Assisted JSON-LD

Structured Data in Textstem: Automatic Schema.org Output and AI-Assisted JSON-LD

Structured data - the machine-readable markup that helps search engines understand what your content is actually about - has always been one of those things that matters enormously for SEO but is painful to maintain by hand. The latest release of the Textstem package makes this significantly easier, with automatic Schema.org output built into core components and an AI-assisted editor for per-page customisation.

Automatic structured data from content components

The News, Projects, and BlogLatestPosts components now emit Schema.org JSON-LD automatically as part of their render cycle — no configuration required.

News & blog article pages

When a visitor lands on an individual news article, the News component appends a NewsArticle object to the page, including the article title, canonical URL, publication date, and featured image (when one is set). On the listing view, an ItemList is output instead — one ListItem per post, with a position index, title, and direct URL. The BlogLatestPosts widget follows the same pattern, producing an ItemList for the posts it surfaces.

Project portfolio pages

Single project views emit a CreativeWork entity carrying the project title, canonical URL, publication date, and hero image. If the project has external links attached (client sites, repositories, etc.), these are mapped to the sameAs property — a clean signal to search engines that these URLs all describe the same thing.

The admin structured data editor

Every page in the CMS now has a collapsible Structured Data panel in the page editor. Inside it is a full Ace JSON editor pre-loaded with whatever JSON-LD is currently saved against the page. An Apply Formatting button pretty-prints the JSON in place so it is easy to read and edit.

The data is stored in meta[schema] alongside the page record and is merged with any structured data that components add at render time, giving you fine-grained control without losing the automatic output.

AI-assisted JSON-LD generation

If you have an OpenAI key configured, a Generate JSON-LD (AI) button appears in the editor. Clicking it sends the page title, description, content, and your organisation details to OpenAI and returns a comprehensive @graph-based JSON-LD block. The graph approach links multiple Schema.org entities — Organisation, WebSite, WebPage, the primary content entity, and a BreadcrumbList — using @id references, which is the format Google's Rich Results documentation recommends.

Organisation details (name, address, phone, social profiles, logo URL) are pulled from the structured-data config file, which can be published and filled in once per project:

php artisan vendor:publish --tag=structured-data

The AI model and token limit are also configurable there, defaulting to gpt-4-turbo-preview with a 1 500-token cap.

SEO audit integration

The built-in SEO Helper now checks rendered page output for the presence of a