jalil.arfaoui.net/src/pages/en/code/projects/[slug].astro

19 lines
611 B
Text
Raw Normal View History

---
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" />