Move getPostExcerpt() into frontmatter getter

This commit is contained in:
Will Boyd
2024-02-26 11:45:06 -05:00
parent 932e7546fa
commit 635451a4e3
2 changed files with 5 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
// get excerpt, not decoded, newlines collapsed
module.exports = (post) => {
const excerpt = post.data.encoded[1].replace(/[(\r\n|\n|\r)]/gm, " ");
return excerpt;
};