Publish Markdown to Medium in 2 Minutes
Markdown is a simple and powerful tools to writing your notes, etc. Even Notion supports exporting as markdown. Why not publish your study note to share knowledge?
Here, I will introduce the way I found to publish markdown to medium in minutes. The first thing you need is Github. And the second one is medium Account.
- Github Account
- Medium Account
Then we can begin!
After you have registered with Medium, go to your setting.
Then find the Integration tokens.
Generate one with the name you like and copy it.
Go to this page, and fork the repository, why not leave a star on it!
- Once you fork the repository, go to Settings of the repository.
- Click Secrets/Actions.
- Click new repository secrets
- Set up secret with Name: MEDIUM_ACCESS_TOKEN, and the Secret is Integration tokens generated by Medium. Just copy to here.
There are two ways to deal with the repository
- clone the repository to your local machine using Git
- using Add files provided by github website
Follow these steps
For markdown files, put all your markdown files to medium-posts folder.
For images in markdown files, copy all your images to data/images
Images should use the url web resources to display such as
Change your-github-name to your github name
Don’t forget to set repository to public for access.
Once you commit the files, the github will do the jobs directly for you!
You can check it using Actions in the github repository web page.
Once you see draft in your Medium Story. Congrats!