fix(builders): skip articles without URLs when importing into sitemap builders

This commit is contained in:
2026-04-30 10:34:17 +00:00
parent 23fbf6ef1a
commit c9254e8a90
9 changed files with 597 additions and 2658 deletions
+3
View File
@@ -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,