You can go to the demo on what this is all about. Nonetheless, this is really very easy even if you don’t know about GatsbyJS.
I have seen a couple of Dev.to API articles here and decided to make something useful with it.
If you already have a blog, this article is also for you. I have been struggling to create some content on my own domain because I feel no one would even bother visiting my site.
At Dev.to though, I just keep coming back to write articles because I know someone would be reading it somehow.
Instead of cross-posting from my own blog to Dev.to, I thought I could do the other way around. I am introducing this very basic Dev.to Gatsby source that you could use with your Gatsby website.
If you do not know what a gatsby source or have never really touched Gatsby, you don’t need to worry since I created a starter.
Here are the steps how to create your own blog using this starter:
- Clone the github repository
1git clone git@github.com:geocine/gatsby-starter-devto.git
- Open
gatsby-config.js
and change line 13 with your Dev.to username
1module.exports = {2 siteMetadata: {3 title: 'Gatsby + Dev.to Starter',4 },5 plugins: [6 ...7 {8 resolve: 'gatsby-source-dev',9 options: {10 // your Dev.to username11 username: 'geocine'12 },13 },14 ...15 ],16}
- Install and start
1yarn2yarn start
- Navigate to http://localhost:8000
This is how it should look like using my username geocine
.
This is still a work in progress, I will be adding more features, feel free to create a pull request. I hope you like it.
If you want to learn more about gatsby, checkout this article.