diff --git a/db/boards.js b/db/boards.js index 2ac932a6..eff8eeca 100644 --- a/db/boards.js +++ b/db/boards.js @@ -326,12 +326,28 @@ module.exports = { 'total': { '$sum': 1 }, + 'sites': { + '$addToSet': '$siteName' + }, 'unlisted': { '$sum': { '$cond': ['$settings.unlistedLocal', 1, 0] } }, } + }, + { + '$project': { + '_id': 1, + 'posts': 1, + 'pph': 1, + 'ppd': 1, + 'total': 1, + 'sites': { + '$size': '$sites' + }, + 'unlisted': 1, + } } ]) .toArray() diff --git a/views/pages/home.pug b/views/pages/home.pug index 5af2a82c..8f962eb4 100644 --- a/views/pages/home.pug +++ b/views/pages/home.pug @@ -65,4 +65,4 @@ block content tr td pre.no-m-p - | There are currently #[span.bold #{webringStats.total}] boards in the known webring. Across all webring boards, #[span.bold #{webringStats.pph}] post#{webringStats.pph === 1 ? ' has' : 's have'} been made in the last hour, #[span.bold #{webringStats.posts}] in total. + | There are currently #[span.bold #{webringStats.sites}] sites and #[span.bold #{webringStats.total}] boards in the known webring. Across all webring boards, #[span.bold #{webringStats.pph}] post#{webringStats.pph === 1 ? ' has' : 's have'} been made in the last hour, #[span.bold #{webringStats.posts}] in total.