import { defineDocumentType , makeSource } from 'contentlayer/source-files' ; import highlight from 'rehype-highlight' ; export const Post = defineDocumentType ( ( ) => ( { name : 'Post' , fields : { title : { type : 'string' , description : 'The title of the post' , required : true , } , date : { type : 'date' , description : 'The date of the post' , required : true , } , } , } ) ) ; export default makeSource ( { contentDirPath : 'posts' , documentTypes : [ Post ] , markdown : { rehypePlugins : [ highlight ] } , } ) ;