Skip to content

Commit

Permalink
Upgrade mdx-bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
jstncno committed Jan 21, 2024
1 parent feac425 commit 35c9b52
Show file tree
Hide file tree
Showing 5 changed files with 685 additions and 757 deletions.
2 changes: 1 addition & 1 deletion lib/components/logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Logo(): JSX.Element {
const {theme} = useTheme();
const logo = theme === 'dark' ? logoDark : logoLight;
return (
(<Link href="/">
(<Link href="/" passHref>

<Image src={logo} alt="jstncno.dev" width={96} height={54} />

Expand Down
5 changes: 3 additions & 2 deletions lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ export async function getAllPosts(publishedOnly = true): Promise<MarkdownPost[]>
}

export async function getPost(pid: string): Promise<MarkdownPost> {
const md = getPostMarkdown(pid);
const {code, frontmatter} = await bundleMDX(md, {
const source = getPostMarkdown(pid);
const {code, frontmatter} = await bundleMDX({
source,
cwd: process.cwd(),
esbuildOptions: options => ({
...options,
Expand Down
Loading

1 comment on commit 35c9b52

@vercel
Copy link

@vercel vercel bot commented on 35c9b52 Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.