fix(smartsitemap): Update CI configuration, bump dependencies, and apply small code cleanups
This commit is contained in:
@@ -8,7 +8,8 @@ export class SitemapNews {
|
||||
|
||||
public async readAndAddFromRssFeedString(feedStringArg: string) {
|
||||
const smartfeedInstance = new plugins.smartfeed.Smartfeed();
|
||||
const parsedFeed = await smartfeedInstance.parseFeedFromString(feedStringArg);
|
||||
const parsedFeed =
|
||||
await smartfeedInstance.parseFeedFromString(feedStringArg);
|
||||
this.rssItems = this.rssItems.concat(parsedFeed.items);
|
||||
}
|
||||
|
||||
@@ -18,15 +19,20 @@ export class SitemapNews {
|
||||
this.rssItems = this.rssItems.concat(parsedFeed.items);
|
||||
}
|
||||
|
||||
public async readAndParseArticles(articleArrayArg: plugins.tsclass.content.IArticle[]) {
|
||||
const rssItemArray = articleArrayArg.map((articleArg): interfaces.IRssItem => {
|
||||
return {
|
||||
title: articleArg.title,
|
||||
content: articleArg.content,
|
||||
isoDate: new Date(/* TODO: put article timestamp here */).toISOString(),
|
||||
link: articleArg.url,
|
||||
};
|
||||
});
|
||||
public async readAndParseArticles(
|
||||
articleArrayArg: plugins.tsclass.content.IArticle[],
|
||||
) {
|
||||
const rssItemArray = articleArrayArg.map(
|
||||
(articleArg): interfaces.IRssItem => {
|
||||
return {
|
||||
title: articleArg.title,
|
||||
content: articleArg.content,
|
||||
isoDate:
|
||||
new Date(/* TODO: put article timestamp here */).toISOString(),
|
||||
link: articleArg.url,
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
this.rssItems = this.rssItems.concat(rssItemArray);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user