Manage your dev.to blog posts from a GIT repo and use continuous deployment to auto publish/update them

Maxime on July 07, 2019

Have you ever wished that you had a monorepo (*1 ) containing all of your dev.to posts on GitHub and once you merge an update into the master branc... [Read Full]
markdown guide
 

This is a really good idea with great potential. Image a standarized API for different blogs. You can automatize publishing and editing, multiple collaborators. And use a git provider as unique source of content.

And you can also make your git repo as some sort of blog. I'll use it for my next posts for sure.

Thanks!

 

Hi Brian,

This is a really good idea with great potential

Thanks! I do intend to push it further and someone else plans to help me out :)!

Image a standarized API for different blogs

That was the original purpose. But I realized it wouldn't fit into a hackday so I decided to get the project up and running with support for only one "publisher" (dev.to). My original though was that I'd build something completely abstract and we could choose for one article to publish on multiple "publisher" at the same time (dev.to, medium, etc).

And you can also make your git repo as some sort of blog

Definitely!

I'll use it for my next posts for sure.

Awesome, glad to hear that! =)

 

Check out my git jekyll blog takes less than a few minutes to setup.

Jekyll

 

I've literally just moved my Blog from WP to VuePress and publishing it over to Netlify with NetlifyCMS integrated. I'm going to try and integrate this into workflow and see if it works. Thank you for this blog post.

 

Hey Michael,

Glad you're up to give it a go, let me know how it goes!

 

Thank you very much!

I was just thinking about it a month ago. Create my blog posts on my website (using NetlifyCMS using Git workflow) then a CD/CI tool (CircleCi) would publish them on Dev.io too. 🎊

 
 

This is pretty cool. Can you help me understand the use case for this vs using Hugo and jeykll? Is this an alternative to creating your own static content and instead leveraging dev.to for hosting it all? Is there any advantage over rss feeds for integration for those of us who have our own site?

 

Hi, sure thing. It is instead to leverage dev.to to host it. As you're aware, a lot of people are publishing on dev.to. Maybe for the audience and visibility, maybe because they don't want to have to learn how to use Hugo and jekyll, or any other reason. But the point is, for those people I'm pretty sure it's hard to:

  • ask for a review before publishing
  • let someone somehow fix things in the article
  • keep track of changes if the article evolves
  • have a backup in case they mess up the article (failed save for e.g.)

With this solution, they can be setup in 2mn to use git and continuous integration to deploy on dev.to 😊

I hope it makes sense

 

Hi Maxime,

Thank you for a great article. Strictly to the point without BS.

I'd like to ask your opinion about the deployment automation service my team is working on.
It is called DeployPlace.

Deploy place is a service by developers for developers, with the possibility to easily deploy complex Java/Scala/Kotlin applications, as well as static websites or client-side projects directly from your CI.

If you somehow have a chance, can you please take a look and let me know your opinion?
DeployPlace.com

 

this way seems like an extra step that you need to make before the post. You always need to get the draft id before it posts.

 

It doesn't seem like it is. It clearly is πŸ™„. Unfortunately it's the best I could come up with as dev.to do not use UUIDs. Otherwise it'd have been easy to generate one πŸ€·β€β™‚οΈ here the only way to automate that part would be to correlate the blog post title but it'd be an issue if you update it (which is obviously not great). As it's a one time thing for an article, I think it's not too bad either though

 

Curious: what issues are you facing with the static blog engine and rss feed integration with dev.to?

 

I'm sorry I might be missing something but I do not understand what you mean, could you be more specific?

 

Sure... You want to keep the posts in a git repo. Static site generators like gatsby, jekyll, hugo, nikola etc. Helps you in that. So when you post a new article, it generates the html from markdowns and also generates an xml file as rss feed. You can use git static site hosting to host your blog and update the rss file url in your dev.to settings > rss auto update field.
So when you post a new article and publish it, dev will fetch it via rss and post it.
I think it's a better way to do it. So I was curious if you were facing any limitations with this approach.

The option you suggested seems great but seems buggy. Only part of my blog post is "imported" (in the drafts)

Oh that explains the issue I'm facing. I switch to hugo for this RSS integration. But it's not working.

 

Best thing ever!! Thank you so much for sharing πŸ™ŒπŸ»πŸ™ŒπŸ»

 

Thanks for the kind words Priyanka 😊!

 

I just started writing my articles on a repo and using Jekyll, with rss feed. Only drawback is once article is released on dev, and changed on repo, it won't update.

 
 
 
 

What a great idea Maxime! And also a great way to build up your GitHub profile in case you're low on contributions (if some recruiters are looking at your profile)

 

Awesome. Just on time I was thinking to setup such thing.

 

Awesome Periklis, if you give it a go let me know if you found the setup easy or if there was any pain point πŸ‘Œ

 

what i was thinking aboutπŸ˜‚ a repo of markdown

 

Great job! This allows you to have contributors and editors.

 

Definitely a good fit for that use case! 😁

 
 
 

Wow! At last I got a weblog from where I be able to in fact obtain useful data concerning my study and knowledge.

 
 
 
code of conduct - report abuse