bravo six, going insano style

This commit is contained in:
Oleksandr 2025-11-22 05:49:00 +02:00
parent 9b2ec20636
commit 7f75bba052
Signed by: Xanazf
GPG key ID: 821EEC32761AC17C
28 changed files with 8620 additions and 10546 deletions

View file

@ -9,14 +9,19 @@ import { render } from "astro:content";
export async function getStaticPaths() {
const { versions } = await getVersionsData();
let pages = await Promise.all(versions.map(async version => {
const pages = await getGuideCollection(version.name);
const pages = await Promise.all(
versions.map(async version => {
const pages = await getGuideCollection(version.name);
return pages.map(page => ({
params: { version: version.name, id: page.id === "index" ? "/" : page.id },
props: { version, page },
}));
}));
return pages.map(page => ({
params: {
version: version.name,
id: page.id === "index" ? "/" : page.id,
},
props: { version, page },
}));
})
);
return pages.flat();
}

View file

@ -14,7 +14,11 @@ export async function getStaticPaths() {
return (await getVersionsData()).versions.flatMap(version => {
return version.modules.flatMap(module => {
return module.types.map(type => ({
params: { version: version.name, module: module.name, type: type.name },
params: {
version: version.name,
module: module.name,
type: type.name,
},
props: { version, module, type },
}));
});
@ -23,7 +27,9 @@ export async function getStaticPaths() {
const { version, module, type } = Astro.props;
const superLink = type.super ? getQMLTypeLink(version.name, type.super) : null;
const superLink = type.super
? getQMLTypeLink(version.name, type.super)
: null;
const details = type.details
? await processMarkdown(version.name, type.details)