Closed pellicceama closed 4 years ago
@gautamdhameja thanks for creating this! Hopefully, this is a useful addition. 🙂
Thanks @pellicceama, but did you test if this is working? For me, it does not seem to work for convertLocal
. Also, the image
variable in front matter is not a default/predefined for both hugo and jekyll. I don't think we should add this.
A number of Hugo themes rely on an
image
variable to be set on the frontMatter in order to designate an image as a header image for a particular post.This PR adds a
--headerImage
(or-h
) option to medium-2-md.Basically, it seems like the html-to-markdown library that this utility uses extracts the medium header images into an image markdown tag at the beginning of the body of the post.
If the
--headerImage
flag is set, this takes it from the body and adds it to the frontMatter as an[image]: /img/imagefile.jpg
.