Come on, Medium code blocks do not support syntax highlighting... Although we can use syntax highlight by GitHubGist, it's painful when we have many code blocks.
medicine
automatically converts code blocks with markdown in Medium into GitHubGist embedded links.
Look at an example of medicine
.
Convert the code block in your Medium article
func main() {
fmt.Println("Hello, World!")
}
into the embedded Gist!
$ go get github.com/micnncim/medicine
- Get GitHub Access Token and Medium Access Token.
- Prepare a Markdown file. See the following rules.
- The first line should be Medium article title.
- Code blocks require a filename. See the example.
- Run
medicine <MARKDOWN_FILE>
. If you run it for the first time, it requires your access tokens and saves the tokens in~/.config/medicine/config.toml
. - A few seconds later, your browser opens your Medium article from the markdown file as a draft. Edit and publish it!
Clone this repository and cd
the path. Then, just run it!
$ medicine example.md