SEO: structured data and correct meta tags for news articles
- NewsArticle + BreadcrumbList JSON-LD (headline, summary, images, ISO dates, authors, GOOI&meer as NewsMediaOrganization publisher, section) - Per-article meta description instead of the generic site text - article:published_time / modified_time in ISO 8601 (was og:article:* in RFC 2822), article:section / article:tag, og:image:alt, og:locale nl_NL - Canonical URL, twitter:card, robots max-image-preview:large - <html lang="nl">, title without leading whitespace, no keywords meta - Article wrapped in <article>, dates in <time datetime> - Metadata is rebuilt after the controller fills in API v2 data (dates, author, content blocks were not reflected before) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab3499e365
commit
dbbdca504e
9 files changed
+224
-24
No files matched your search
@@ -41,6 +41,8 @@ class NewsController extends Controller
|
||||
} elseif (isset($apiResult->source->blocks)) {
|
||||
$newsItem->content = $apiResult->source->blocks;
|
||||
}
|
||||
// Dates, author and content may have changed above
|
||||
$newsItem->buildMetadata();
|
||||
return view('newsitem', array_merge($this->getSidebareData(), ['type' => $apiResult->type, 'news' => $newsItem, 'metadata' => $newsItem->metadata, 'searchURL' => 'nieuws/zoeken']));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user