fix(core): update
This commit is contained in:
parent
b0719c481e
commit
599af94709
@ -23,7 +23,8 @@ tap.test('should create a feed', async () => {
|
||||
authorName: 'Phil',
|
||||
imageUrl: 'https://central.eu/someimage.png',
|
||||
timestamp: Date.now(),
|
||||
url: 'https://central.eu/article/somearticle'
|
||||
url: 'https://central.eu/article/somearticle',
|
||||
content: 'somecontent'
|
||||
});
|
||||
const rssFeed = feed.exportRssFeedString();
|
||||
console.log(rssFeed);
|
||||
|
@ -16,6 +16,7 @@ export interface IFeedItem {
|
||||
url: string;
|
||||
authorName: string;
|
||||
imageUrl: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export class Feed {
|
||||
@ -32,7 +33,8 @@ export class Feed {
|
||||
private getFeedObject() {
|
||||
const feed = new plugins.feed.Feed({
|
||||
copyright: `All rights reserved, ${this.options.company}`,
|
||||
id: this.options.domain,
|
||||
id: `https://${this.options.domain}`,
|
||||
link: `https://${this.options.domain}`,
|
||||
title: this.options.title,
|
||||
author: {
|
||||
name: this.options.company,
|
||||
@ -49,8 +51,9 @@ export class Feed {
|
||||
feed.addItem({
|
||||
title: itemArg.title,
|
||||
date: new Date(itemArg.timestamp),
|
||||
link: itemArg.url,
|
||||
image: itemArg.imageUrl,
|
||||
link: itemArg.url.replace(/&/gm, '&'),
|
||||
image: itemArg.imageUrl.replace(/&/gm, '&'),
|
||||
content: itemArg.content,
|
||||
author: [{
|
||||
name: itemArg.authorName
|
||||
}]
|
||||
|
Loading…
Reference in New Issue
Block a user