mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-11 18:56:14 +09:00
Move getPostExcerpt() into frontmatter getter
This commit is contained in:
@@ -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;
|
||||||
|
};
|
||||||
@@ -110,11 +110,6 @@ function getPostCoverImageId(postData) {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPostExcerpt(post) {
|
|
||||||
const excerpt = post.encoded[1].replace(/(\r\n|\n|\r)/gm, " ");
|
|
||||||
return excerpt;
|
|
||||||
}
|
|
||||||
|
|
||||||
function collectAttachedImages(channelData) {
|
function collectAttachedImages(channelData) {
|
||||||
const images = getItemsOfType(channelData, 'attachment')
|
const images = getItemsOfType(channelData, 'attachment')
|
||||||
// filter to certain image file types
|
// filter to certain image file types
|
||||||
|
|||||||
Reference in New Issue
Block a user