Skip to content

Commit df2a295

Browse files
authored
Merge pull request #56 from benmccormick/master
Add Support for JSON Feed v1
2 parents b68d4cc + f1ce790 commit df2a295

File tree

5 files changed

+253
-34
lines changed

5 files changed

+253
-34
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Feed for Node.js
22

3-
> [Feed](http://projets.jpmonette.net/en/feed) is a *RSS 2.0* and *Atom 1.0* generator for **Node.js**, making content syndication simple and intuitive!
3+
> [Feed](http://projets.jpmonette.net/en/feed) is a *RSS 2.0*, *JSON Feed 1.0*, and *Atom 1.0* generator for **Node.js**, making content syndication simple and intuitive!
44
5-
[![Build Status](https://travis-ci.org/jpmonette/feed.svg?branch=master)](https://travis-ci.org/jpmonette/feed)
5+
[![Build Status](https://travis-ci.org/jpmonette/feed.svg?branch=master)](https://travis-ci.org/jpmonette/feed)
66
[![Coverage Status](https://coveralls.io/repos/github/jpmonette/feed/badge.svg?branch=master)](https://coveralls.io/github/jpmonette/feed?branch=master)
77

88
## Installation
@@ -30,14 +30,18 @@ Insert feed-specific information:
3030
```js
3131
let feed = new Feed({
3232
title: 'Feed Title',
33-
description: 'This is my personnal feed!',
33+
description: 'This is my personal feed!',
3434
id: 'http://example.com/',
3535
link: 'http://example.com/',
3636
image: 'http://example.com/image.png',
37+
favicon: 'http://example.com/favicon.ico',
3738
copyright: 'All rights reserved 2013, John Doe',
3839
updated: new Date(2013, 06, 14), // optional, default = today
3940
generator: 'awesome', // optional, default = 'Feed for Node.js'
40-
41+
feedLinks: {
42+
json: 'https://example.com/json',
43+
atom: 'https://example.com/atom',
44+
},
4145
author: {
4246
name: 'John Doe',
4347
@@ -55,6 +59,7 @@ posts.forEach(post => {
5559
id: post.url,
5660
link: post.url,
5761
description: post.description,
62+
content: post.content,
5863
author: [{
5964
name: 'Jane Doe',
6065
@@ -107,6 +112,12 @@ Output an Atom 1.0 feed:
107112
feed.atom1()
108113
```
109114

115+
Output a JSON Feed 1.0 feed:
116+
117+
```js
118+
feed.json1()
119+
```
120+
110121
Yes, it's that simple :)!
111122

112123
## More Information

lib/feed.js

Lines changed: 95 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)