[SiteGen] Better meta description
This commit is contained in:
parent
cf61e63df0
commit
4e3f301bd6
|
@ -55,7 +55,7 @@ export default () => {
|
||||||
let cards = [];
|
let cards = [];
|
||||||
|
|
||||||
let name = 'GooseMod Store';
|
let name = 'GooseMod Store';
|
||||||
let description = 'Browse GooseMod modules';
|
let description = '';
|
||||||
|
|
||||||
for (const repo of repos) {
|
for (const repo of repos) {
|
||||||
console.log(repo);
|
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
|
if (repos.length === 1) { // 1 repo likely means a custom repo, so use that name and description
|
||||||
name = json.meta.name;
|
name = json.meta.name;
|
||||||
description = json.meta.description;
|
description = `${json.meta.description} `;
|
||||||
}
|
}
|
||||||
|
|
||||||
cards = cards.concat(json.modules);
|
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));
|
cards = cards.sort((a, b) => a.name.localeCompare(b.name)).map((x) => makeCard(x));
|
||||||
|
|
||||||
template = template
|
template = template
|
||||||
|
|
Loading…
Reference in New Issue