Ajout de getLocalizedCollection/getLocalizedEntry dans content-i18n.ts pour fusionner automatiquement les entrées localisées avec leur base FR. Schémas adaptés (champs partagés optionnels), 78 fichiers de contenu allégés, consommateurs migrés.
18 lines
611 B
Text
18 lines
611 B
Text
---
|
|
import ProjectDetailContent from '../../../../components/code/ProjectDetailContent.astro';
|
|
import { getLocalizedCollection } from '../../../../utils/content-i18n';
|
|
import { getProjectBaseSlug } from '../../../../utils/i18n';
|
|
|
|
export async function getStaticPaths() {
|
|
const enProjects = (await getLocalizedCollection('projects', 'en'))
|
|
.filter(p => !p.data.draft && p.data.category === 'dev');
|
|
return enProjects.map(project => ({
|
|
params: { slug: getProjectBaseSlug(project.id) },
|
|
props: { project },
|
|
}));
|
|
}
|
|
|
|
const { project } = Astro.props;
|
|
---
|
|
|
|
<ProjectDetailContent project={project} lang="en" />
|