Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pavanjadhaw/mdm
π Publish your markdown to medium, from cli
https://github.com/pavanjadhaw/mdm
Last synced: about 1 month ago
JSON representation
π Publish your markdown to medium, from cli
- Host: GitHub
- URL: https://github.com/pavanjadhaw/mdm
- Owner: pavanjadhaw
- License: mit
- Created: 2018-12-28T07:05:13.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-06T08:57:21.000Z (almost 6 years ago)
- Last Synced: 2024-11-06T21:52:55.452Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 38
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- jimsghstars - pavanjadhaw/mdm - π Publish your markdown to medium, from cli (JavaScript)
README
> publish your markdown to medium, from cli
MDM is commandline utility that lets you publish your markdown documents
without leaving your comfy terminal.## Install
```
$ npm i -g @pavanjadhaw/mdm
```## Configure
MDM requires medium integration token and author id to be able to publish your markdown.
You can generate integration token from the medium [settings](https://medium.com/me/settings) page.
Export this integration token by adding it to your `~/.bashrc` or `~/.zshrc` as follows```sh
export MEDIUM_TOKEN='token here'
```after adding integration token you can easily get your unique author id by running `mdm init`.
then export your unique author id as follows```sh
export MEDIUM_ID='authorID here'
```Now you are good to go...
## Publishing
For publishing, your markdown doc must have the following frontmatter:
```yaml
---
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:
```markdown
![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
```console
$ mdm publish path/to/markdown.md
Done! Your post has been published at https://medium.com/@gaben/76272e9d241c
```Itβs that simple.
## Uninstall
It's sad to see you go :(
```sh
$ npm uninstall -g @pavanjadhaw/mdm
```## Inspiration
This project is completely based on [@icyphox](https://github.com/icyphox)'s [mdium](https://github.com/icyphox/mdium) project.
[mdium](https://github.com/icyphox/mdium) is written is python, I wanted to try and implement it in node.## License
MIT Β© [Pavan Jadhaw](https://pavanjadhaw.me)