Skip to content

Image hosting supported

Latest
Compare
Choose a tag to compare
@DaveParr DaveParr released this 05 Aug 13:49

You can now embed images in your dev.to posts with GitHub hosting! 🖼️

dev.to.ol will parse the article before it is posted to dev.to, and as long as the environmental variables are set, will modify the image links from local images to the expected location on GitHub user storage (https://raw.githubusercontent.com). As long as you already have, or intend to, push the image assets to GitHub, the links will work and the images will display in the dev.to post!

In order to help this work, a new setup_environ function has been included which will create a brand new .Renviron in the project directory to hold your environmental variables.

Finally, I realised a bug may occur on installation as not all dependencies were fully declared. No one seems to have hit this so far (the dependencies are very populat packages), but in a clean environment it might crop up.

Talking of which, I recently setup in a GitHub Action to generate my README Profile which includes my most popular dev.to posts! Using the inbuilt repo secrets approach you can actually set this up very easily. The key line is this one, which will work as long as you have your dev.to api key accessible as a secret named DEVTO.

Let me know if you do anything interesting with this package!