From c312622fb1d97e13e71f99abf9ab909e9c65d529 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 26 Oct 2020 17:19:23 +0000 Subject: [PATCH] fix(core): update --- ts/smartsitemap.classes.smartsitemap.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ts/smartsitemap.classes.smartsitemap.ts b/ts/smartsitemap.classes.smartsitemap.ts index a931c35..10fcde4 100644 --- a/ts/smartsitemap.classes.smartsitemap.ts +++ b/ts/smartsitemap.classes.smartsitemap.ts @@ -1,5 +1,7 @@ import { SitemapNews } from './smartsitemap.classes.sitemapnews'; +import { SitemapWebsite } from './smartsitemap.classes.sitemapwebsite'; import * as plugins from './smartsitemap.plugins'; +import * as interfaces from './interfaces'; export class SmartSitemap { constructor() {} @@ -17,6 +19,14 @@ export class SmartSitemap { * creates a normal sitemap from a list of urls */ public async createSitemapFromYmlString(yamlString: string) { - const yamlObject = await plugins.smartyaml.yamlStringToObject(yamlString); + const yamlObject: interfaces.ISitemapYaml = await plugins.smartyaml.yamlStringToObject(yamlString); + const sitemapWebsite = new SitemapWebsite(); + for(const urlArg of yamlObject.daily) { + sitemapWebsite.addUrl({ + url: urlArg, + timestamp: Date.now() - 10000, + frequency: 'daily' + }); + } } }