mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[SiteGen] Better meta description
This commit is contained in:
parent
cf61e63df0
commit
4e3f301bd6
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue