diff --git a/src/components/atoms/PostLead.jsx b/src/components/atoms/PostLead.jsx index 6acc4f64..152bcfcd 100644 --- a/src/components/atoms/PostLead.jsx +++ b/src/components/atoms/PostLead.jsx @@ -9,14 +9,10 @@ const PostLead = ({ post, index }) => { const content = post.html const separator = '' - if (post.frontmatter.type === 'post') { - if (content.includes(separator)) { - lead = content.split(separator)[0] - } else { - lead = content.split('\n')[0] - } + if (content.includes(separator)) { + lead = content.split(separator)[0] } else { - return null + lead = content.split('\n')[0] } return ( diff --git a/src/templates/Post.jsx b/src/templates/Post.jsx index b2517903..3885c133 100644 --- a/src/templates/Post.jsx +++ b/src/templates/Post.jsx @@ -31,7 +31,7 @@ const Post = ({ data, location }) => {
- + {type === 'post' && } {image && ( )} diff --git a/src/templates/Posts.jsx b/src/templates/Posts.jsx index cb4a2fe3..738b35dc 100644 --- a/src/templates/Posts.jsx +++ b/src/templates/Posts.jsx @@ -37,9 +37,12 @@ const Posts = ({ data, location, pageContext }) => { )} - {type === 'post' && } - - {type === 'post' && Continue Reading} + {type === 'post' && ( + + + Continue Reading + + )} {type === 'link' && (