Skip to content

Commit

Permalink
Add rehypeRaw plugin to ReactMarkdown in TeamMember
Browse files Browse the repository at this point in the history
This plugins allows rendering embedded HTML in markdown text
  • Loading branch information
edg956 committed Sep 12, 2024
1 parent e6040f5 commit eef06aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/People/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { SEO } from '../seo'
import TeamStat, { pineappleOnPizzaStat } from './TeamStat'
import { StaticImage } from 'gatsby-plugin-image'
import ReactMarkdown from 'react-markdown'
import rehypeRaw from 'rehype-raw'
import SideModal from 'components/Modal/SideModal'
import { Profile } from '../../templates/Team'

Expand Down Expand Up @@ -66,7 +67,9 @@ export const TeamMember = (props) => {
/>
</figure>
<div className="overflow-hidden absolute h-full w-full inset-0 p-4 bg-accent dark:bg-accent-dark">
<ReactMarkdown className="text-sm bio-preview">{biography}</ReactMarkdown>
<ReactMarkdown rehypePlugins={[rehypeRaw]} className="text-sm bio-preview">
{biography}
</ReactMarkdown>
<div className="bg-gradient-to-t from-accent dark:from-accent-dark to-transparent absolute inset-0 w-full h-full" />
</div>
</div>
Expand Down

0 comments on commit eef06aa

Please sign in to comment.