Write authors to metadata
This requires an updated version of mediumexporter, which has been added in package.json
This commit is contained in:
parent
f8da665b5b
commit
e01e510ed3
2 changed files with 4 additions and 2 deletions
|
@ -57,6 +57,8 @@ const fetchFromMedium = async (mediumUrl) => {
|
|||
const metadata = JSON.stringify({
|
||||
title: post.title,
|
||||
subtitle: post.subtitle,
|
||||
author: post.author || "",
|
||||
authors: post.authors || [],
|
||||
date: new Date(post.date),
|
||||
tags: post.tags,
|
||||
url: post.url,
|
||||
|
@ -66,7 +68,7 @@ const fetchFromMedium = async (mediumUrl) => {
|
|||
})
|
||||
|
||||
// write metadata to output folder
|
||||
fs.writeFileSync(path.join(outputFolder, 'metadata.json'))
|
||||
fs.writeFileSync(path.join(outputFolder, 'metadata.json'), metadata)
|
||||
return post
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"commander": "^3.0.2",
|
||||
"dotenv": "^8.2.0",
|
||||
"markdown": "^0.5.0",
|
||||
"mediumexporter": "github:xdamman/mediumexporter#v0.2.0",
|
||||
"mediumexporter": "github:badrihippo/mediumexporter#9800098576785a61602b4993770f7e7a2cf1d639",
|
||||
"r2": "^2.0.1",
|
||||
"webdav": "^2.10.0"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue