mirror of
https://github.com/svemagie/indiekit-endpoint-blogroll.git
synced 2026-04-02 15:34:59 +02:00
feat: category tabs, future post badge, HTML entity decoding
- Decode HTML entities (& ' etc) in feed titles and summaries - Add isFuture flag to API items for future-dated posts - Bump version to 1.0.12 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -249,12 +249,14 @@ function sanitizeBlog(blog) {
|
||||
* @returns {object} Sanitized item
|
||||
*/
|
||||
function sanitizeItem(item) {
|
||||
const published = item.published ? new Date(item.published) : null;
|
||||
return {
|
||||
id: item._id.toString(),
|
||||
url: item.url,
|
||||
title: item.title,
|
||||
summary: item.summary,
|
||||
published: item.published,
|
||||
isFuture: published ? published > new Date() : false,
|
||||
author: item.author,
|
||||
photo: item.photo,
|
||||
categories: item.categories,
|
||||
|
||||
Reference in New Issue
Block a user