A modern, fast, and easy-to-use RSS, JSON and Atom feed generator for Deno and the web.
Replacement for feed package.
- Build with modern technologies, and the latest standards, using TypeScript and Deno.
- Using JSR, insuring the best performance, and the best compatibility.
- Supported feed formats: RSS 2.0, Atom 1.0 and JSON Feed 1.1.
- Build for Deno, and supports Node.js, and more.
- Easy to use, and easy to customize.
- Typed, and fully documented.
- No dependencies.
- Fully tested.
Installation can be simply done by importing the generator you want to use, like so:
import { Atom } from "jsr:@feed/feed";
But, you can also just download the package, simply by running:
deno install jsr:@feed/feed
or
npx jsr add @feed/feed
import { Atom } from "jsr:@feed/feed";
const atomFeed = new Atom({
title: "Atom Feed Example",
description: "A simple Atom feed example",
link: "http://example.com/atom-feed",
authors: [
{
name: "John Doe",
},
],
id: "https://example.com/atom-feed",
});
atomFeed.addItem({
title: "First Atom Item",
link: "http://example.com/atom1",
id: "1",
updated: new Date(),
summary: "Summary for Atom item 1",
content: {
body: "Content for Atom item 1",
type: "html",
},
});
Deno.writeTextFileSync("example.xml", atomFeed.build());
import { Rss } from "jsr:@feed/feed";
const rssFeed = new Rss({
title: "RSS Feed Example",
description: "A simple RSS feed example",
link: "http://example.com/rss-feed",
id: "http://example.com/rss-feed",
authors: [
{
name: "John Doe",
email: "test@example.org",
},
],
});
rssFeed.addItem({
title: "First RSS Item",
link: "http://example.com/rss1",
id: "http://example.com/rss1",
updated: new Date("2024-10-19T15:12:56Z"),
description: "Description for RSS item 1",
content: {
body: "Content for RSS item 1",
type: "html",
},
});
Deno.writeTextFileSync("example.rss", rssFeed.build());
import { Json } from "jsr:@feed/feed";
const jsonFeed = new Json({
title: "JSON Feed Example",
description: "A simple JSON feed example",
link: "http://example.com/json-feed",
feed: "http://example.com/json-feed/feed.json",
authors: [
{
name: "John Doe",
email: "test@example.org",
},
],
});
jsonFeed.addItem({
id: "1",
title: "First JSON Item",
url: "http://example.com/json1",
date_published: new Date("2024-10-19T15:12:56Z"),
content_html: "Content for JSON item 1",
});
Deno.writeTextFileSync("example.json", jsonFeed.build());
You can find the full documentation here.
This project is under the GPL-3.0 License:
- Permissions: Commercial use, Modification, Distribution, Private use.
- Limitations: Liability, Warranty.
- Conditions: License and copyright notice. State changes, and Disclose source.
Read the full license here.
Please read the CONTRIBUTING.md file for more information.