add remark and rehype plugins
This commit is contained in:
parent
5e75ffc8bb
commit
c9c4c00c2b
|
|
@ -1,6 +1,9 @@
|
|||
import { defineDocumentType, makeSource } from 'contentlayer/source-files'
|
||||
// import readingTime from 'reading-time'
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import rehypeSlug from 'rehype-slug'
|
||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
|
||||
import wikiLinkPlugin from "remark-wiki-link-plus"
|
||||
|
||||
const OtherPage = defineDocumentType(() => ({
|
||||
name: 'OtherPage',
|
||||
|
|
@ -18,6 +21,10 @@ export default makeSource({
|
|||
contentDirPath: 'content',
|
||||
documentTypes: [OtherPage],
|
||||
mdx: {
|
||||
remarkPlugins: [remarkGfm],
|
||||
remarkPlugins: [
|
||||
remarkGfm,
|
||||
[wikiLinkPlugin, { markdownFolder: 'content' }]
|
||||
],
|
||||
rehypePlugins: [rehypeSlug, rehypeAutolinkHeadings]
|
||||
}
|
||||
})
|
||||
Loading…
Reference in New Issue