upstream #1

Merged
jblu merged 1007 commits from upstream into main 2024-11-04 22:35:57 -06:00
Showing only changes of commit d78b8bd902 - Show all commits

View File

@ -56,13 +56,11 @@ export async function getFileBySlug(type, slug) {
let toc = []
// Parsing frontmatter here to pass it in as options to rehype plugin
const { data: frontmatter } = matter(source)
const { code } = await bundleMDX({
const { code, frontmatter } = await bundleMDX({
source,
// mdx imports can be automatically source from the components directory
cwd: path.join(root, 'components'),
xdmOptions(options) {
xdmOptions(options, frontmatter) {
// this is the recommended way to add custom remark/rehype plugins:
// The syntax might look weird, but it protects you in case we add/remove
// plugins in the future.