@@ -9,6 +9,7 @@ import getAllFilesRecursively from './utils/files'
99import remarkGfm from 'remark-gfm'
1010import remarkFootnotes from 'remark-footnotes'
1111import remarkMath from 'remark-math'
12+ import remarkExtractFrontmatter from './remark-extract-frontmatter'
1213import remarkCodeTitles from './remark-code-title'
1314import remarkTocHeadings from './remark-toc-headings'
1415import remarkImgToJsx from './remark-img-to-jsx'
@@ -67,6 +68,7 @@ export async function getFileBySlug(type, slug) {
6768 // plugins in the future.
6869 options . remarkPlugins = [
6970 ...( options . remarkPlugins ?? [ ] ) ,
71+ remarkExtractFrontmatter ,
7072 [ remarkTocHeadings , { exportRef : toc } ] ,
7173 remarkGfm ,
7274 remarkCodeTitles ,
@@ -79,10 +81,7 @@ export async function getFileBySlug(type, slug) {
7981 rehypeSlug ,
8082 rehypeAutolinkHeadings ,
8183 rehypeKatex ,
82- [
83- rehypeCitation ,
84- { bibliography : frontmatter ?. bibliography , path : path . join ( root , 'data' ) } ,
85- ] ,
84+ [ rehypeCitation , { path : path . join ( root , 'data' ) } ] ,
8685 [ rehypePrismPlus , { ignoreMissing : true } ] ,
8786 rehypePresetMinify ,
8887 ]
0 commit comments