[SiteGen] Better meta description

This commit is contained in:
Ducko 2021-07-02 18:06:45 +01:00 committed by Alyxia Sother
parent cf61e63df0
commit 4e3f301bd6
No known key found for this signature in database
GPG key ID: 355968D14144B739

View file

@ -55,7 +55,7 @@ export default () => {
let cards = [];
let name = 'GooseMod Store';
let description = 'Browse GooseMod modules';
let description = '';
for (const repo of repos) {
console.log(repo);
@ -64,12 +64,14 @@ export default () => {
if (repos.length === 1) { // 1 repo likely means a custom repo, so use that name and description
name = json.meta.name;
description = json.meta.description;
description = `${json.meta.description} `;
}
cards = cards.concat(json.modules);
}
description += `Browse ${cards.filter((x) => x.tags.includes('theme')).length} themes and ${cards.filter((x) => !x.tags.includes('theme')).length} plugins from ${Object.keys(cards.reduce((acc, x) => { (!Array.isArray(x.authors) ? [ x.authors ] : x.authors).forEach((a) => acc[typeof a === 'object' ? a.i : a] = true); return acc; }, {})).length} developers.`;
cards = cards.sort((a, b) => a.name.localeCompare(b.name)).map((x) => makeCard(x));
template = template