Render Yamb post collections as RSS 2.0 and Atom 1.0 XML.
For GitHub Packages, route the @yamb scope to https://npm.pkg.github.com and install @yamb/render-xml.
Requires Node.js 26.13 or later and yamb 1.1.0 or later. Direct rendering needs no storage.
pnpm add yamb yamb-render-xmlimport { atom, rss } from 'yamb-render-xml';
const source = {
id: 'hello',
uri: '2026/11/hello',
title: 'Hello',
text: 'Hello, world.',
status: 'published',
publishedAt: '2026-11-12T09:00:00Z',
updatedAt: '2026-11-12T09:00:00Z'
};
const ctx = {
base: new URL('https://example.com/blog'),
timeZone: 'UTC'
};
const news = rss({
title: 'My blog',
description: 'Latest articles',
language: 'en',
feed: 'https://example.com/blog/rss.xml'
});
const updates = atom({
title: 'My blog',
feed: 'https://example.com/blog/atom.xml',
author: {
name: 'Editor'
}
});
const input = {
posts: [source]
};
console.log(await news.collection(input, ctx));
console.log(await updates.collection(input, ctx));- RSS and Atom configuration, output mapping and Markdown preparation
- Yamb core reference for renderer registration and context
MIT. See LICENSE.