v1.18.x
Julian Lam 12 years ago
parent aeb831eeff
commit 8d04454457

@ -20,11 +20,13 @@ var path = require('path'),
var categoryUrls = []; var categoryUrls = [];
categories.getAllCategories(function(data) { categories.getAllCategories(function(data) {
data.categories.forEach(function(category) { data.categories.forEach(function(category) {
if (!category.disabled) {
categoryUrls.push({ categoryUrls.push({
url: path.join('category', category.slug), url: path.join('category', category.slug),
changefreq: 'weekly', changefreq: 'weekly',
priority: '0.4' priority: '0.4'
}); });
}
}); });
next(null, categoryUrls); next(null, categoryUrls);
@ -34,11 +36,13 @@ var path = require('path'),
var topicUrls = []; var topicUrls = [];
topics.getAllTopics(null, null, function(topics) { topics.getAllTopics(null, null, function(topics) {
topics.forEach(function(topic) { topics.forEach(function(topic) {
if (topic.deleted !== '1') {
topicUrls.push({ topicUrls.push({
url: path.join('topic', topic.slug), url: path.join('topic', topic.slug),
changefreq: 'daily', changefreq: 'daily',
priority: '0.6' priority: '0.6'
}); });
}
}); });
next(null, topicUrls); next(null, topicUrls);

Loading…
Cancel
Save