progwise.net - The DevOps Factory

How to Connect Gatsby and Dev.to

Written by Pascal Helbig -

  • Gatsby
  • RSS
  • Dev.to

At https://www.progwise.net/ we were looking for a solution to link our blog with Dev.to. We want to publish our blog posts simultaneously on our website and on Dev.to.

My initial idea was to use a Gatsby plugin. In fact there is a plugin that allows you to integrate Dev.to posts as source in Gatsby: https://github.com/geocine/gatsby-source-dev. But this plugin was out of question for us for two reasons. Firstly, only one Dev.to account can be specified in this plugin. But we are several people, each with an own account, posting on our blog. On the other hand we want to own our blog posts ourselves. We feel Dev.to is very trustworthy at the moment, but if Dev.to is switched off overnight, we might not be able to get our articles back that easily.

Therefore we have decided to go the opposite way. Instead of writing our articles on Dev.to, we publish them first on our own blog. Then we automatically publish them via RSS on Dev.to. With the Gatsby plugin gatsby-plugin-feed we created a separate RSS feed for each team member. Afterwards we added in the Dev.to settings in each account the corresponding RSS feed, as you can see in the screenshot:

Settings to publish post in Dev.to from RSS feed

If we now publish a new post on our website, it will automatically be created as a draft on Dev.to.