astro-ghostcms/.pnpm-store/v3/files/41/800c51128e82465911004f38a7c...

20 lines
591 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
import { fileURLToPath } from "node:url";
import { safeParseFrontmatter } from "../content/utils.js";
const markdownContentEntryType = {
extensions: [".md"],
async getEntryInfo({ contents, fileUrl }) {
const parsed = safeParseFrontmatter(contents, fileURLToPath(fileUrl));
return {
data: parsed.data,
body: parsed.content,
slug: parsed.data.slug,
rawData: parsed.matter
};
},
// We need to handle propagation for Markdown because they support layouts which will bring in styles.
handlePropagation: true
};
export {
markdownContentEntryType
};