Skip to content

Commit

Permalink
fix dangerouslySetInnerHTML in p tag causing excerpt to disappear.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Burato committed Feb 23, 2019
1 parent 8121acf commit eb6e4c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ class BlogIndex extends React.Component {
<Link to={node.fields.slug}>{title}</Link>
</h2>
<p className="txt-small txt-muted">{node.frontmatter.date}</p>
<p dangerouslySetInnerHTML={{ __html: node.excerpt }} />
<div
className="post-excerpt"
dangerouslySetInnerHTML={{ __html: node.excerpt }}
/>
<p>
<small>
<em>
Expand Down

0 comments on commit eb6e4c1

Please sign in to comment.