fix(core): update

This commit is contained in:
2020-10-26 12:18:33 +00:00
parent 850f20fc38
commit b6abfd11d2
9 changed files with 132 additions and 64 deletions

View File

@@ -5,10 +5,18 @@ export class SmartSitemap {
constructor() {}
/**
* creates a sitemap for news
* creates a sitemap for news from feedurl
*/
public createSmartsitemapNews(): SitemapNews {
public async createSitemapNewsFromFeedUrl(feedUrlArg: string): Promise<string> {
const sitemapNewsInstance = new SitemapNews({});
return sitemapNewsInstance;
await sitemapNewsInstance.readAndAddFromRssFeed(feedUrlArg);
return sitemapNewsInstance.exportSitemapXml();
}
/**
* creates a normal sitemap from a list of urls
*/
public async createSitemapFromYmlString(yamlString: string) {
const yamlObject = await plugins.smartyaml.yamlStringToObject(yamlString);
}
}