DEV Community

Debbie O'Brien
Debbie O'Brien

Posted on

Adding your dev.to posts to your website

I previously had created my blog on my website with Netlify CMS which works great but I found myself adding posts to Medium and some to my own website. It is always good to have posts on your own site to gain more traffic etc but not many people know about my site so I felt it wasn't going to help many people. Medium makes people pay for some content so it's not really ideal. I needed a way to write posts so they could reach many people but also show up on my site. Dev.to to the rescue.

In September 2019 Dev.to opened their public API and I saw an article on how to add it and kept thinking I must get round to doing it but never did.

Then last week Nuxt.js published a great blog post on how to build a dev.to clone with the new Nuxt fetch. So I decided it was time to read that post and implement the code.

With the latest version of Nuxt.js you can now use the fetch hook in any of your Vue components which is just amazing.

If you read through the post and check the source code it will give you an idea of how everything works and then really all you have to do is modify the API call to so that it retrieves posts from your username only. Really it is as simple as that.

https://dev.to/api/articles?username=debs_obrien
Enter fullscreen mode Exit fullscreen mode

I encourage you to give it a try. Have fun and let me know how you get on.

My Blog with dev.to articles

Top comments (0)