UNPKG

@bliztek/feed-generator

Version:

A simple and lightweight Node.js library for generating RSS 2.0, Atom, and JSON Feed formats.

40 lines (28 loc) 2.37 kB
# Changelog All notable changes to this project will be documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/). ## [2.2.0] - 2026-04-08 ### Changed - Migrated repository and CI from GitHub to GitLab. - Replaced GitHub Actions workflow with GitLab CI pipeline. ## [2.1.0] - 2026-04-08 ### Added - **RSS `<content:encoded>`** -- full HTML content now emitted alongside `<description>` when `item.content` is set. Platforms like Dev.to read this element for syndicated post bodies. The `content:` namespace was already declared but unused; it is now active. - **RSS `<media:content>`** -- `FeedItem.image` now renders as `<media:content url="..." medium="image" />` in RSS output. The `xmlns:media` namespace is conditionally declared only when items have images. - **Atom item images** -- `FeedItem.image` now renders as `<link rel="enclosure" href="..." type="image/..." />` in Atom entries, with MIME type inferred from the URL file extension. - **Custom extensions** -- new `extensions` field on `Feed` and `FeedItem` for injecting arbitrary XML namespaces, XML elements, and JSON Feed properties without library changes. Supports Dublin Core, GeoRSS, Spotify podcast namespace, or any custom namespace. - **XSLT stylesheet support** -- new `stylesheet` option in `FeedOptions` emits a `<?xml-stylesheet?>` processing instruction for browser-friendly RSS/Atom rendering. - **WebSub hub link** -- new `hub` field in `feedLinks` emits `<atom:link rel="hub">` (RSS), `<link rel="hub">` (Atom), and `hubs` array (JSON Feed) for real-time push notification support. - **`FeedItem.image` URL validation** -- image URLs are now validated like other URL fields. - **`FeedBuilder` methods**: `.hub()`, `.extensions()`, `.stylesheet()`. - **Exported `XmlNode` type** for building custom extension elements. ### Changed - RSS/Atom renderer signatures now accept an options object instead of a boolean `compact` parameter (internal change, public API unchanged). ## [2.0.0] - 2024-12-14 - Complete rewrite with unified data model for RSS 2.0, Atom 1.0, and JSON Feed 1.1. - Fluent `FeedBuilder` API. - Full iTunes/podcast namespace support. - Whitelist-based HTML sanitization with XSS protection. - Comprehensive input validation with `FeedValidationError`. - Feed pagination via `nextUrl`. - Zero dependencies, dual ESM + CJS build.