fix(smartsitemap): Update CI configuration, bump dependencies, and apply small code cleanups

This commit is contained in:
2025-11-19 21:03:37 +00:00
parent 74c73e05f2
commit fe7e95d57f
15 changed files with 9246 additions and 4536 deletions

View File

@@ -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);
}