Skip to content

Commit

Permalink
Merge pull request #25 from herbievine/seo
Browse files Browse the repository at this point in the history
add article tag + remove components
  • Loading branch information
herbievine authored Jun 5, 2023
2 parents df23671 + 35ded73 commit cfe7a7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 42 deletions.
14 changes: 0 additions & 14 deletions src/components/Image.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions src/components/Link.tsx

This file was deleted.

15 changes: 3 additions & 12 deletions src/components/Render.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"use client";
import { useMDXComponent } from "next-contentlayer/hooks";
import React from "react";
import Link from "./Link";
import Image from "./Image";

type RenderProps = React.PropsWithChildren<{
code: string;
Expand All @@ -12,15 +10,8 @@ export default function Render({ code }: RenderProps) {
const MDX = useMDXComponent(code);

return (
<div className="prose prose-neutral dark:prose-invert">
<MDX
components={{
Link,
Image: ({ src, alt, width = 1200, height = 630 }) => (
<Image src={src} alt={alt} width={width} height={height} />
),
}}
/>
</div>
<article className="prose prose-neutral dark:prose-invert">
<MDX />
</article>
);
}

1 comment on commit cfe7a7f

@vercel
Copy link

@vercel vercel bot commented on cfe7a7f Jun 5, 2023

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.