Arreglo del import en los posts
This commit is contained in:
@@ -16,8 +16,8 @@ export async function getStaticPaths() {
|
|||||||
const { post } = Astro.props;
|
const { post } = Astro.props;
|
||||||
const { Content } = await render(post);
|
const { Content } = await render(post);
|
||||||
|
|
||||||
|
const cleaned = post.filePath.replace(/^src\/posts\//, "").replace(/\.mdx$/, "");
|
||||||
const postMD = await import(/* @vite-ignore */ `../../../${post.filePath}`);
|
const postMD = await import(`../../posts/${cleaned}.mdx`);
|
||||||
const headings = postMD.getHeadings();
|
const headings = postMD.getHeadings();
|
||||||
const description = post.data.descripcion;
|
const description = post.data.descripcion;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user