fix: align blog renderer field names with posts.json schema

This commit is contained in:
oliver
2026-05-03 05:10:29 -03:00
parent 62c4aee24c
commit d518ad2ae4
+11 -12
View File
@@ -2858,24 +2858,23 @@
function postMarkup(post) { function postMarkup(post) {
return [ return [
'<a class="news-card" href="' + post.link + '">', '<div class="news-card">',
'<img class="news-card-image" src="' + post.image ? '<img class="news-card-image" src="' +
post.image + post.image +
'" alt="' + '" alt="' +
post.headline.replace(/"/g, "&quot;") + post.title.replace(/"/g, "&quot;") +
'">', '">' : '',
'<div class="news-card-body">', '<div class="news-card-body">',
"<div>", "<div>",
'<div class="news-area">' + post.vertical + "</div>", '<div class="news-area">' + post.area + "</div>",
'<h3 class="news-title">' + post.headline + "</h3>", '<h3 class="news-title">' + post.title + "</h3>",
'<p class="news-teaser">' + post.shortText + "</p>", '<p class="news-teaser">' + post.teaser + "</p>",
'<span class="news-date">' + '<span class="news-date">' +
formatDate(post.date) + formatDate(post.date) +
"</span>", "</span>",
"</div>", "</div>",
'<span class="news-link">Read article &#8594;</span>',
"</div>", "</div>",
"</a>", "</div>",
].join(""); ].join("");
} }
@@ -2921,9 +2920,9 @@
filteredPosts = allPosts.filter(function (post) { filteredPosts = allPosts.filter(function (post) {
if (!term) return true; if (!term) return true;
var haystack = [ var haystack = [
post.headline, post.title,
post.vertical, post.area,
post.shortText, post.teaser,
] ]
.join(" ") .join(" ")
.toLowerCase(); .toLowerCase();