press releases

This commit is contained in:
Timo Knuth
2026-01-27 12:29:44 +01:00
parent be5db36b7f
commit 4dc7c29134
19 changed files with 606 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import type { BlogPost, AuthorProfile, PillarMeta } from "./types";
import type { BlogPost, AuthorProfile, PillarMeta, Testimonial, AggregateRating } from "./types";
const SITE_URL = "https://www.qrmaster.net";
@@ -244,3 +244,44 @@ export function articleSchema(params: {
url: params.url,
};
}
export function reviewSchema(testimonial: Testimonial) {
return {
'@context': 'https://schema.org',
'@type': 'Review',
itemReviewed: {
'@type': 'SoftwareApplication',
name: 'QR Master',
applicationCategory: 'BusinessApplication',
operatingSystem: 'Web Browser'
},
reviewRating: {
'@type': 'Rating',
ratingValue: testimonial.rating,
bestRating: 5,
worstRating: 1
},
author: {
'@type': 'Person',
name: testimonial.author.name
},
datePublished: testimonial.datePublished,
reviewBody: testimonial.content,
headline: testimonial.title
};
}
export function aggregateRatingSchema(aggregateRating: AggregateRating) {
return {
'@context': 'https://schema.org',
'@type': 'Product',
name: 'QR Master',
aggregateRating: {
'@type': 'AggregateRating',
ratingValue: aggregateRating.ratingValue,
reviewCount: aggregateRating.reviewCount,
bestRating: aggregateRating.bestRating,
worstRating: aggregateRating.worstRating
}
};
}