Skip to content

Commit

Permalink
adjusting excerpt formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kendallstrautman committed Aug 19, 2019
1 parent 53e961c commit 79eebc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/assets/content/blog/song-of-myself.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ hero_image: "/src/assets/content/images/ren-ran-bBiuSdck8tU-unsplash.jpg"

---
I have heard what the talkers were talking, the talk of the
beginning and the end

But I do not talk of the beginning or the end. There was never any more inception than there is now, Nor any more youth or age than there is now, And will never be any more perfection than there is now,
Nor any more heaven or hell than there is now.
beginning and the end. But I do not talk of the beginning or the end. There was never any more inception than there is now, Nor any more youth or age than there is now, And will never be any more perfection than there is now, Nor any more heaven or hell than there is now.

Urge and urge and urge, Always the procreant urge of the world.
Out of the dimness opposite equals advance, always substance and
Expand Down
3 changes: 2 additions & 1 deletion src/components/BlogList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
return new Date(date).toDateString().slice(4)
},
formatExcerpt(excerpt) {
return excerpt.slice(0,200).trim() + "..."
const blurb = excerpt.slice(3,200).trim()
return blurb.indexOf('</p>') !== -1 ? blurb.slice( 0, blurb.indexOf('</p>') ).trim() + "..." : blurb + "..."
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ export default {
date (format: "MMMM DD YYYY")
hero_image (width:1000, quality: 75)
content
excerpt
}
}
}
}
</page-query>

//for some reason, excerpt is undefined??

0 comments on commit 79eebc4

Please sign in to comment.