dzen.nstarikov.ru/docs/superpowers/specs/2026-08-11-rss-title-deduplication-design.md

46 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2026-08-11 21:05:28 +03:00
# RSS Title Deduplication Design
## Goal
Prevent Dzen articles imported from the RSS feed from displaying the article
title twice at the beginning of the publication.
## Current Behavior
Each RSS item already exposes the article title in the standard `<title>`
element. The feed generator additionally prepends the same value as an `<h1>`
inside `content:encoded`, causing Dzen to render a duplicate title.
The existing article renderer already removes a leading duplicate title from
saved article HTML. The duplicate is reintroduced afterward by the RSS feed
builder.
## Design
Build `content:encoded` directly from the RSS-safe article renderer without
prepending an `<h1>`. Keep the standard RSS `<title>` element unchanged.
The cover image caption remains unchanged. It may contain the article title,
but it is an image caption rather than the leading article heading and is
explicitly outside this change.
## Scope
- Change only the RSS item body construction.
- Preserve article pages rendered at `/posts/{slug}`.
- Preserve RSS metadata, including `<title>`, description, categories, media,
enclosure, and publication dates.
- Preserve cover image `alt` text and `<figcaption>`.
- Do not rewrite or strip other headings authored inside the article body.
## Verification
Add a regression test that builds an RSS item and verifies:
- the article title is present in the item `<title>`;
- `content:encoded` does not begin with the generated article-title `<h1>`;
- the lead and article body remain present in `content:encoded`.
Run the focused RSS test, the existing backend test suite, and Python bytecode
compilation.