fix(builders): skip articles without URLs when importing into sitemap builders
This commit is contained in:
@@ -76,6 +76,9 @@ export class NewsSitemapBuilder extends UrlsetBuilder {
|
||||
*/
|
||||
importFromArticles(articles: plugins.tsclass.content.IArticle[]): this {
|
||||
for (const article of articles) {
|
||||
if (!article.url) {
|
||||
continue;
|
||||
}
|
||||
this.add({
|
||||
loc: article.url,
|
||||
lastmod: article.timestamp ? new Date(article.timestamp) : undefined,
|
||||
|
||||
Reference in New Issue
Block a user