-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use mdx instead of markdown * fix build
- Loading branch information
Showing
8 changed files
with
1,976 additions
and
591 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
import { MDXRemote, MDXRemoteSerializeResult } from 'next-mdx-remote' | ||
import { | ||
Card, | ||
CardHeader, | ||
CardBody, | ||
CardFooter, | ||
Divider, | ||
Link, | ||
Image, | ||
} from '@nextui-org/react' | ||
|
||
type PostBodyProps = { | ||
content: string | ||
source: MDXRemoteSerializeResult | ||
} | ||
|
||
const components = { | ||
Card, | ||
CardBody, | ||
CardHeader, | ||
CardFooter, | ||
Divider, | ||
Link, | ||
Image, | ||
} | ||
|
||
const PostBody: React.FC<PostBodyProps> = ({ content }) => { | ||
return ( | ||
<div className="max-w-2xl mx-auto"> | ||
<div dangerouslySetInnerHTML={{ __html: content }} /> | ||
</div> | ||
) | ||
const PostBody: React.FC<PostBodyProps> = ({ source }) => { | ||
return <MDXRemote {...source} components={{ ...components }} /> | ||
} | ||
|
||
export default PostBody |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import remarkGfm from 'remark-gfm' | ||
import createMDX from '@next/mdx' | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
|
||
const withMDX = createMDX({ | ||
options: { | ||
extension: /\.mdx?$/, | ||
remarkPlugins: [remarkGfm], | ||
rehypePlugins: [], | ||
// If you use `MDXProvider`, uncomment the following line. | ||
// providerImportSource: "@mdx-js/react", | ||
}, | ||
}) | ||
export default withMDX(nextConfig) |
Oops, something went wrong.
35c0b71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
blog – ./
blog-git-main-caulagi.vercel.app
blog.caulagi.com
blog-caulagi.vercel.app