better formatting
This commit is contained in:
parent
ea50aafde6
commit
df06da280b
2 changed files with 28 additions and 17 deletions
13
index.ts
13
index.ts
|
|
@ -10,5 +10,16 @@ export async function renderMdx(source: string): Promise<string> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function mdxIntegration(): Integration {
|
export function mdxIntegration(): Integration {
|
||||||
return { name: "mdx", setup(context) { context.loader("mdx", { name: "mdx", extensions: [".mdx"], async load(file) { return { data: {}, content: await renderMdx(file.source) }; } }); } };
|
return {
|
||||||
|
name: "mdx",
|
||||||
|
setup(context) {
|
||||||
|
context.loader("mdx", {
|
||||||
|
name: "mdx",
|
||||||
|
extensions: [".mdx"],
|
||||||
|
async load(file) {
|
||||||
|
return { data: {}, content: await renderMdx(file.source) };
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue