We can agree that dev.to is the best dev spot in the world. What if you want to cross-post your dev articles into your own personal blog site, but too lazy to copy-paste each post? ๐ด
Now you can fetch all your DEV posts in markdown easily! ๐ฑ
Clone the repo, install all dependencies, and create content/
directory in project root. The files will go in there
git clone https://github.com/iggredible/dev-fetch-articles.git
cd dev-fetch-articles
npm install
mkdir content
echo "DEV_KEY={YOUR_DEV_KEY}" >> .env
// replace {YOUR_DEV_KEY} with your dev key values from the dev.to site
This script uses dotenv to store your DEV_KEY info. Create a .env
file in project root and add DEV_KEY=YOUR_DEV_KEY_HERE
(you can find your DEV_KEY
inside Settings -> Account on dev.to site).
Easy! Just run npm run fetch-dev
. You will find all your articles inside the newly created content/
directory. You can use this script into your app or use this script to generate content that you can copy to your app.
Any PR for improvements/ suggestions are more than welcome! โ๏ธ
MIT ยฉ Igor Irianto