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) {
return [
'<a class="news-card" href="' + post.link + '">',
'<img class="news-card-image" src="' +
'<div class="news-card">',
post.image ? '<img class="news-card-image" src="' +
post.image +
'" alt="' +
post.headline.replace(/"/g, "&quot;") +
'">',
post.title.replace(/"/g, "&quot;") +
'">' : '',
'<div class="news-card-body">',
"<div>",
'<div class="news-area">' + post.vertical + "</div>",
'<h3 class="news-title">' + post.headline + "</h3>",
'<p class="news-teaser">' + post.shortText + "</p>",
'<div class="news-area">' + post.area + "</div>",
'<h3 class="news-title">' + post.title + "</h3>",
'<p class="news-teaser">' + post.teaser + "</p>",
'<span class="news-date">' +
formatDate(post.date) +
"</span>",
"</div>",
'<span class="news-link">Read article &#8594;</span>',
"</div>",
"</a>",
"</div>",
].join("");
}
@@ -2921,9 +2920,9 @@
filteredPosts = allPosts.filter(function (post) {
if (!term) return true;
var haystack = [
post.headline,
post.vertical,
post.shortText,
post.title,
post.area,
post.teaser,
]
.join(" ")
.toLowerCase();