diff --git a/functions.js b/functions.js index af19767..611d0b8 100644 --- a/functions.js +++ b/functions.js @@ -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 }; diff --git a/package.json b/package.json index 6ce9b49..7e1b04b 100644 --- a/package.json +++ b/package.json @@ -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" }