`).join('');
}function generateRecommendationsArray(scores, metrics) {
const recommendations = [];
if (scores.overall < 70) {
recommendations.push('Improve overall sitemap structure and organization for better search engine crawling');
}
if (scores.structure < 75) {
recommendations.push('Organize URLs in logical hierarchy and set appropriate priority levels');
}
if (scores.coverage < 70) {
recommendations.push('Ensure all important pages are included in the sitemap for complete coverage');
}
if (scores.seo < 65) {
recommendations.push('Optimize priority settings and changefreq values for better SEO performance');
}
if (scores.technical < 80) {
recommendations.push('Fix technical issues like broken URLs and improve sitemap compression');
}
if (metrics.brokenUrls > 0) {
recommendations.push(`Remove ${metrics.brokenUrls} broken URLs from the sitemap to improve crawl efficiency`);
}
recommendations.push('Regularly update the sitemap with new content and remove outdated URLs');
recommendations.push('Consider creating separate sitemaps for different content types (images, videos, news)');
return recommendations.slice(0, 8);
}function showError(msg) {
const el = document.getElementById('errorMessage');
el.textContent = msg;
el.classList.add('show');
}function hideError() {
document.getElementById('errorMessage').classList.remove('show');
}function showNotification(msg) {
const notif = document.getElementById('notification');
notif.textContent = msg;
notif.classList.add('show');
setTimeout(() => notif.classList.remove('show'), 2500);
}