--- // Import section components import { SITE } from "@data/constants"; import MainLayout from "@/layouts/MainLayout.astro"; import { Image } from "astro:assets"; import { getCollection, render } from "astro:content"; // Use `getStaticPaths` to generate static routes for generated pages on build export async function getStaticPaths() { const insightPosts = await getCollection("insights", ({ id }) => id.startsWith("fr/")); return insightPosts.map((post) => { const slugWithoutLang = post.id.replace(/^fr\//, ''); // Remove the "fr/" prefix return { params: { lang: 'fr', id: slugWithoutLang }, props: { post }, }; }); } // Get the props for this page that define a specific insight post const { post } = Astro.props; const { Content } = await render(post); const pageTitle: string = `${post.data.title} | ${SITE.title}`; ---
{post.data.cardImageAlt}

{post.data.title}