Move author logic to frontmatter getter

This commit is contained in:
Will Boyd
2024-02-26 12:40:33 -05:00
parent 36cbf638aa
commit a8929901e3
2 changed files with 5 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
// get author, without decoding
// WordPress doesn't allow funky characters in author names anyway
module.exports = (post) => {
return post.data.creator[0];
}
-4
View File
@@ -110,10 +110,6 @@ function getPostCoverImageId(postData) {
return id;
}
function getAuthor(post) {
return post.creator[0]
}
function collectAttachedImages(channelData) {
const images = getItemsOfType(channelData, 'attachment')
// filter to certain image file types