mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): add optional OG image support to blog posts (#878)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
57ab4b2cdb
commit
156986abb9
@@ -63,6 +63,7 @@ export function createBlogPostingSchema(params: {
|
||||
readingTime?: number;
|
||||
authors: CollectionEntry<'authors'>[];
|
||||
siteUrl: string;
|
||||
image?: string;
|
||||
}): WithContext<BlogPosting> {
|
||||
return {
|
||||
'@context': 'https://schema.org',
|
||||
@@ -70,6 +71,7 @@ export function createBlogPostingSchema(params: {
|
||||
headline: params.title,
|
||||
description: params.description,
|
||||
url: params.url,
|
||||
...(params.image && { image: params.image }),
|
||||
datePublished: params.pubDate.toISOString(),
|
||||
...(params.updatedDate && { dateModified: params.updatedDate.toISOString() }),
|
||||
...(params.wordCount && { wordCount: params.wordCount }),
|
||||
|
||||
Reference in New Issue
Block a user