fix(core): update

This commit is contained in:
2021-01-03 02:48:45 +00:00
parent 114cd1900b
commit b8befa85fa
4 changed files with 31 additions and 5 deletions

View File

@ -14,4 +14,29 @@ export interface IRssItem {
categories?: string[];
contentSnippet?: string;
enclosure?: any;
}
}
export interface IParsedSiteMap {
urlset: {
url:
| {
loc: string;
lastmod: string;
changefreq: string;
}
| {
loc: string;
lastmod: string;
changefreq: string;
}[]
| {
loc: string;
'news:news': {
'news:publication': [];
'news:keywords': string;
'news:publication_date': string;
'news:title': string;
};
}[];
};
}

View File

@ -44,6 +44,7 @@ export class SitemapNews {
};
}[] = [];
for (const itemArg of this.rssItems) {
console.log(itemArg);
urls.push({
loc: itemArg.link,
'news:news': {

View File

@ -75,7 +75,7 @@ export class SmartSitemap {
/**
* parses a sitemap
*/
public async parseSitemap(sitemapXmlArg: string) {
public async parseSitemap(sitemapXmlArg: string): Promise<interfaces.IParsedSiteMap> {
return (new plugins.smartxml.SmartXml()).parseXmlToObject(sitemapXmlArg);
}
}