From 924a9553e92e56893f8dc8b961b9655147e6b2c8 Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Sat, 24 Feb 2024 14:30:26 -0500 Subject: [PATCH] More post parsing comments --- src/parser.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parser.js b/src/parser.js index 3b9717d..e1dafa9 100644 --- a/src/parser.js +++ b/src/parser.js @@ -62,6 +62,7 @@ function collectPosts(channelData, postTypes, config) { const postsForType = getItemsOfType(channelData, postType) .filter(postData => postData.status[0] !== 'trash' && postData.status[0] !== 'draft') .map(postData => ({ + // raw post data, used by frontmatter getters data: postData, // meta data isn't written to file, but is used to help with other things @@ -71,8 +72,10 @@ function collectPosts(channelData, postTypes, config) { coverImageId: getPostCoverImageId(postData), coverImage: undefined, // possibly set later in mergeImagesIntoPosts() type: postType, - imageUrls: [] + imageUrls: [] // possibly set later in mergeImagesIntoPosts() }, + + // contents of the post in markdown content: translator.getPostContent(postData, turndownService, config) }));