DEV Community

Or Yaacov
Or Yaacov

Posted on • Updated on

Dev.to post to markdown utility

Because of I love dev.to, and that I also have my own blog,
I created a new cli that converts dev.to link to markdown :)

Image description

How it works
The utility extract the post id from the page, and then using the post-id to query the raw markdown from dev.to API.

or you can just read the code here:
https://github.com/oryaacov/devto-to-markdown

Installation

  1. Ensure you have Node.js and npm (Node Package Manager) installed on your system.
  2. Open your terminal or command prompt.
  3. Execute the following command to install the utility globally: npm i -g devto-to-markdown`

Usage

Once the utility is installed, you can convert Dev.to blogs to Markdown using the following command:

devto-to-markdown -u <devto-url>

Replace <devto-url> with the URL of the Dev.to blog you want to convert.

For example:

devto-to-markdown -u https://dev.to/oryaacov/how-to-setup-http-server-with-security-headers-using-nginx-docker-dok

Top comments (0)