From abb7a21e28f6891c95b36cc4b018a2b725ce67bf Mon Sep 17 00:00:00 2001
From: Serhii Hospodarchuk <69005134+gosxrgxx@users.noreply.github.com>
Date: Mon, 20 Jul 2026 16:31:04 +0300
Subject: [PATCH] feat(core): add summary field support for atom and json feed
(#22758)
* fix(core): summary field in json feed
* feat(core): add summary field to atom
* test: update json view test to match the new summary field
---
lib/types.ts | 1 +
lib/views/atom.test.tsx | 1 +
lib/views/atom.tsx | 1 +
lib/views/json.test.ts | 2 +-
lib/views/json.ts | 2 +-
5 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/types.ts b/lib/types.ts
index 54c128ae3..a565a21be 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -50,6 +50,7 @@ export type DataItem = {
html: string;
text: string;
};
+ summary?: string;
image?: string;
banner?: string;
updated?: number | string | Date;
diff --git a/lib/views/atom.test.tsx b/lib/views/atom.test.tsx
index 8010a8cec..59bac8f50 100644
--- a/lib/views/atom.test.tsx
+++ b/lib/views/atom.test.tsx
@@ -22,6 +22,7 @@ describe('Atom view', () => {
description: 'Entry One',
pubDate: '2024-01-01T00:00:00Z',
updated: '2024-01-02T00:00:00Z',
+ summary: 'Entry One',
author: 'Author One',
category: 'News',
media: {
diff --git a/lib/views/atom.tsx b/lib/views/atom.tsx
index 71ccabd68..f2c997663 100644
--- a/lib/views/atom.tsx
+++ b/lib/views/atom.tsx
@@ -25,6 +25,7 @@ const RSS: FC<{ data: Data }> = ({ data }) => (
{item.guid || item.link || item.title}
{item.pubDate && {new Date(item.pubDate).toISOString()}}
{new Date(item.updated || item.pubDate || new Date()).toISOString()}
+ {item.summary && {item.summary}}
{item.author && (
{item.author}
diff --git a/lib/views/json.test.ts b/lib/views/json.test.ts
index f18046ca4..ddfd7671d 100644
--- a/lib/views/json.test.ts
+++ b/lib/views/json.test.ts
@@ -16,7 +16,7 @@ describe('JSON view', () => {
{
title: 'Item One',
link: 'https://example.com/one',
- description: 'Entry One',
+ summary: 'Entry One',
guid: 'guid-1',
content: {
html: 'hello
',
diff --git a/lib/views/json.ts b/lib/views/json.ts
index f79536f50..5dfff9a83 100644
--- a/lib/views/json.ts
+++ b/lib/views/json.ts
@@ -22,7 +22,7 @@ const json = (data: Data) => {
// content_html and content_text are each optional strings — but one or both must be present
content_html: (item.content && item.content.html) || item.description || item.title,
content_text: item.content && item.content.text,
- summary: item.description,
+ summary: item.summary,
image: item.image || item.itunes_item_image,
banner_image: item.banner,
date_published: item.pubDate,