Open JoshuaKGoldberg opened 2 years ago
I tried this today and ran into a bunch of issues. For now I'm going to keep hardcoding markdown. 🤷
One little snippet to save for later:
exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions;
const typeDefs = `
type Mdx implements Node {
frontmatter: Frontmatter
}
type Frontmatter {
link: FrontmatterLink
}
type FrontmatterLink {
url: String!
title: String!
}
`;
createTypes(typeDefs);
};
I have to copy & paste image markup between posts. Might as well make this reusable.