mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 15:20:39 +01:00
#2254 sitemap topic limit
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user