AEO/GEO
This commit is contained in:
@@ -321,3 +321,41 @@ export function aggregateRatingSchema(aggregateRating: AggregateRating) {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export interface NewsArticleParams {
|
||||
headline: string;
|
||||
datePublished: string;
|
||||
description: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export function newsArticleSchema(params: NewsArticleParams) {
|
||||
return {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'NewsArticle',
|
||||
headline: params.headline,
|
||||
datePublished: params.datePublished,
|
||||
description: params.description,
|
||||
url: params.url || SITE_URL,
|
||||
author: {
|
||||
'@type': 'Organization',
|
||||
name: 'QR Master',
|
||||
'@id': `${SITE_URL}/#organization`,
|
||||
},
|
||||
publisher: {
|
||||
'@type': 'Organization',
|
||||
name: 'QR Master',
|
||||
'@id': `${SITE_URL}/#organization`,
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: `${SITE_URL}/static/og-image.png`,
|
||||
width: 1200,
|
||||
height: 630,
|
||||
},
|
||||
},
|
||||
mainEntityOfPage: {
|
||||
'@type': 'WebPage',
|
||||
'@id': params.url || SITE_URL,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user