diff --git a/src/pages/posts/[id].astro b/src/pages/posts/[id].astro index 79a5580..f3fa108 100644 --- a/src/pages/posts/[id].astro +++ b/src/pages/posts/[id].astro @@ -16,8 +16,8 @@ export async function getStaticPaths() { const { post } = Astro.props; const { Content } = await render(post); - -const postMD = await import(/* @vite-ignore */ `../../../${post.filePath}`); +const cleaned = post.filePath.replace(/^src\/posts\//, "").replace(/\.mdx$/, ""); +const postMD = await import(`../../posts/${cleaned}.mdx`); const headings = postMD.getHeadings(); const description = post.data.descripcion;