fix: align blog renderer field names with posts.json schema
This commit is contained in:
+11
-12
@@ -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, """) +
|
||||
'">',
|
||||
post.title.replace(/"/g, """) +
|
||||
'">' : '',
|
||||
'<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 →</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();
|
||||
|
||||
Reference in New Issue
Block a user