fix(core): update

This commit is contained in:
2020-10-28 17:43:58 +00:00
parent 35680b135d
commit d03b37690f
6 changed files with 97 additions and 43 deletions

View File

@@ -15,6 +15,24 @@ export class SmartSitemap {
return sitemapNewsInstance.exportSitemapXml();
}
/**
* creates a sitemap for news from feedxmlstring
*/
public async createSitemapNewsFromAFeedStringArg(feedStringArg: string): Promise<string> {
const sitemapNewsInstance = new SitemapNews({});
await sitemapNewsInstance.readAndAddFromRssFeedString(feedStringArg);
return sitemapNewsInstance.exportSitemapXml();
}
/**
* creates a sitemap for news from an array of articles
*/
public async createSitemapNewsFromArticleArray(articleArrayArg: plugins.tsclass.content.IArticle[]): Promise<string> {
const sitemapNewsInstance = new SitemapNews({});
await sitemapNewsInstance.readAndParseArticles(articleArrayArg);
return sitemapNewsInstance.exportSitemapXml();
}
/**
* creates a normal sitemap from a list of urls
*/