1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

feat: add Curriculum vitae

This commit is contained in:
Divlo
2022-02-22 21:19:42 +01:00
parent 729e540d04
commit 0e0036b737
35 changed files with 16881 additions and 1899 deletions

View File

@ -4,8 +4,8 @@ import path from 'node:path'
import type { MDXRemoteSerializeResult } from 'next-mdx-remote'
import { serialize } from 'next-mdx-remote/serialize'
import remarkGfm from 'remark-gfm'
import remarkPrism from 'remark-prism'
import rehypeSlug from 'rehype-slug'
import rehypeHighlight from 'rehype-highlight'
import matter from 'gray-matter'
export const postsPath = path.join(process.cwd(), 'posts')
@ -64,8 +64,8 @@ export const getPostBySlug = async (
}
const source = await serialize(post.content, {
mdxOptions: {
remarkPlugins: [remarkGfm as any, remarkPrism],
rehypePlugins: [rehypeSlug as any]
remarkPlugins: [remarkGfm as any],
rehypePlugins: [rehypeSlug as any, rehypeHighlight]
}
})
return { ...post, source }