Skip to main content

For posting articles to Medium

Project description

Publish markdown

Publish articles written in Markdown files to the following platforms:

  • medium.com

Markdown files should include YAML frontmatter with at least a title:

---
title: Some title or other
---

{content in Markdown}

I wrote this to cross-posting article from my own Jekyll blog, in a GitHub workflow (which I may yet publish as an action).

Publishing to medium.com

$ pip3 install publish-markdown
$ export MEDIUM_TOKEN={your-integration-token}
$ publish-to-medium _posts/2022-01-01-my-first-post.md --canonical-url="https://my-blog.com/2022/01/02/my-first-post"
Found user ID: {your-user-id}
- Article posted to https://medium.com/@nottrobin/how-to-use-unix-linkchecker-to-thoroughly-check-any-site-50134f3aeba0
- Added 'medium.com' to 'posted_to' metadata

Optimisations

You can avoid the code having to retrieve your user ID every time by setting it as an environment variable as well:

export MEDIUM_USER_ID={your-user-id}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

publish-markdown-0.1.0.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file publish-markdown-0.1.0.tar.gz.

File metadata

  • Download URL: publish-markdown-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for publish-markdown-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d3d166048785fef7864deb6718bc478cbb53fe65a8aa4048c0995ee26987c472
MD5 73f1e32ec87cae5a4bc9609149c79797
BLAKE2b-256 c39e3c4393876d1c8c6cd5fa28fb1eb1d067a3bac1ef0370ea6c44932139a426

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page