add post excerpt to frontmatter

This commit is contained in:
Eka
2020-03-28 22:04:44 +07:00
committed by Will Boyd
parent d0330f05d8
commit 932e7546fa
+5
View File
@@ -110,6 +110,11 @@ function getPostCoverImageId(postData) {
return id;
}
function getPostExcerpt(post) {
const excerpt = post.encoded[1].replace(/(\r\n|\n|\r)/gm, " ");
return excerpt;
}
function collectAttachedImages(channelData) {
const images = getItemsOfType(channelData, 'attachment')
// filter to certain image file types