fix: missing rss items

This commit is contained in:
Cory Dransfeldt 2024-05-02 19:51:06 -07:00
parent 214201e76e
commit 64f42b8973
No known key found for this signature in database
3 changed files with 5 additions and 4 deletions

View file

@ -59,8 +59,9 @@ export default {
// posts
filterByPostType: (posts, postType) => {
if (postType === 'featured') return posts.reverse().filter(post => post.data.featured === true).splice(0, 3)
return posts.splice(0, 5)
const postData = [...posts]
if (postType === 'featured') return postData.reverse().filter(post => post.data.featured === true).splice(0, 3)
return postData.splice(0, 5)
},
truncateByWordCount: (text, wordCount) => {
const words = sanitizeHtml(text, { allowedTags: ['']}).split(/\s+/);