-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: accept a factory function as feed parameter
If only one feed should be generated, an object can be passed as well now
- Loading branch information
Showing
5 changed files
with
174 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const { resolve } = require('path') | ||
|
||
module.exports = { | ||
rootDir: resolve(__dirname, '../../../'), | ||
srcDir: resolve(__dirname, '../'), | ||
dev: false, | ||
render: { | ||
resourceHints: false | ||
}, | ||
modules: ['@@'], | ||
feed: () => ({ | ||
create (feed) { | ||
feed.options = { | ||
title: 'Feed Title', | ||
description: 'This is my personal feed!', | ||
id: 'http://example.com/', | ||
link: 'http://example.com/', | ||
image: 'http://example.com/image.png', | ||
favicon: 'http://example.com/favicon.ico', | ||
updated: new Date(2000, 6, 14), // optional, default = today | ||
copyright: 'All rights reserved 2013, John Doe', | ||
generator: 'awesome', // optional, default = 'Feed for Node.js' | ||
feedLinks: { | ||
json: 'https://example.com/json', | ||
atom: 'https://example.com/atom' | ||
}, | ||
author: { | ||
name: 'John Doe', | ||
email: 'johndoe@example.com', | ||
link: 'https://example.com/johndoe' | ||
} | ||
} | ||
}, | ||
type: 'rss2' | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const { resolve } = require('path') | ||
|
||
module.exports = { | ||
rootDir: resolve(__dirname, '../../../'), | ||
srcDir: resolve(__dirname, '../'), | ||
dev: false, | ||
render: { | ||
resourceHints: false | ||
}, | ||
modules: ['@@'], | ||
feed: { | ||
create (feed) { | ||
feed.options = { | ||
title: 'Feed Title', | ||
description: 'This is my personal feed!', | ||
id: 'http://example.com/', | ||
link: 'http://example.com/', | ||
image: 'http://example.com/image.png', | ||
favicon: 'http://example.com/favicon.ico', | ||
updated: new Date(2000, 6, 14), // optional, default = today | ||
copyright: 'All rights reserved 2013, John Doe', | ||
generator: 'awesome', // optional, default = 'Feed for Node.js' | ||
feedLinks: { | ||
json: 'https://example.com/json', | ||
atom: 'https://example.com/atom' | ||
}, | ||
author: { | ||
name: 'John Doe', | ||
email: 'johndoe@example.com', | ||
link: 'https://example.com/johndoe' | ||
} | ||
} | ||
}, | ||
type: 'rss2' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters