feat: i18n paths

This commit is contained in:
tresabhi committed 2024-12-27 13:16:51 -06:00
1 parent 68362c22b1
commit 1f577c2317
11 files changed
+44 -7

No files matched your search

@@ -3,12 +3,22 @@ import type { GetStaticPaths } from 'astro';
import { capitalize } from 'lodash-es';
import { embedConfigurations } from '../../../../../constants/embeds';
import BaseLayout from '../../../../../layouts/BaseLayout.astro';
import { getStaticPaths as parentGetStaticPaths } from '../index.astro';
import { Page } from './_index';
export const getStaticPaths = (() => {
return Object.keys(embedConfigurations).map((embed) => ({
params: { embed: embed as keyof typeof embedConfigurations },
}));
const parentPaths = parentGetStaticPaths();
return Object.keys(embedConfigurations)
.map((embed) =>
parentPaths.map((parent) => ({
params: {
...parent.params,
embed: embed as keyof typeof embedConfigurations,
},
})),
)
.flat();
}) satisfies GetStaticPaths;
---