Node.js based forum software built for the modern web
#2254 sitemap topic limit
barisusakli5337a31eb99e
diff --git a/src/sitemap.js b/src/sitemap.jsindex 114c6f4462..ffc072b871 100644--- a/src/sitemap.js+++ b/src/sitemap.js@@ -9,6 +9,7 @@ var path = require('path'),categories = require('./categories'),topics = require('./topics'),privileges = require('./privileges'),+ meta = require('./meta'),utils = require('../public/src/utils'),sitemap = {obj: undefined,@@ -56,7 +57,7 @@ var path = require('path'),async.waterfall([function(next) {- db.getSortedSetRevRange('topics:recent', 0, -1, next);+ db.getSortedSetRevRange('topics:recent', 0, parseInt(meta.config.sitemapTopics, 10) || -1, next);},function(tids, next) {privileges.topics.filter('read', tids, 0, next);diff --git a/src/views/admin/settings/web-crawler.tpl b/src/views/admin/settings/web-crawler.tplindex f7d57ec241..c8fb03b0ff 100644--- a/src/views/admin/settings/web-crawler.tpl+++ b/src/views/admin/settings/web-crawler.tpl@@ -25,6 +25,10 @@<input type="checkbox" data-field="feeds:disableSitemap"> <strong>Disable Sitemap.xml</strong></label></div>++ <label>Number of Topic to Display in Sitemap</label>+ <input class="form-control" type="text" placeholder="" data-field="sitemapTopics" />+</form></div></div>