publish your markdown to Medium, from the CLI
Update: Looks like you can get an integration token by emailing customer support?
Medium post I wrote on a whim.
$ pip install mdium
First off, set up mdium
with your Medium integration token. You’ll have to generate one from the settings page.
$ mdium init <integration-token>
This will create a file at ~/.mdium
, containing your integration token and author ID.
For publishing, your markdown doc must have the following frontmatter:
---
title: My Awesome Post
tags: ['some', 'tags', 'here']
status: draft
---
## markdown here
...
Note that the status
field can be either draft
or public
. I recommend that you publish them as drafts and fine tune using Medium’s editor.
If your post contains images, host them somewhere public and then include them in your document like so:
![cat](https://catpics.com/some_cat.png)
Medium will then CDN it and you can delete it from there if you want to.
When you’re ready to publish, run
$ mdium publish path/to/markdown.md
Done! Your post has been published at https://medium.com/@gaben/76272e9d241c
It’s that simple.
MIT © Anirudh Oppiliappan