04/2023 UPDATE: While the overall idea of the blog post remains unchanged and is still relevant, I no longer recommend to use Travis. Instead use G...
For further actions, you may consider blocking this person and/or reporting abuse
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,
Thanks! I do intend to push it further and someone else plans to help me out :)!
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).
Definitely!
Awesome, glad to hear that! =)
Check out my git jekyll blog takes less than a few minutes to setup.
Jekyll
Hey!
It's been almost 3 years since my comment. I ended up building this github action: github.com/protiumx/blogpub/
And here the article I wrote about it protiumx.dev/blog/posts/publish-yo...
Also how I use it for my blog
github.com/protiumx/blogp/
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!
Good job ! Thank's you for sharing this with us !
Thanks for the kind words Louis!
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
Maxime, first of all, thanks for the cool idea 👍
I have a couple of questions/suggestions:
Hi Fyodor, thanks :)!
1) It'd be great for sure to have something in command line and we've got an issue here github.com/maxime1992/dev-to-git/i... if you have further ideas on that please share there
2) I did not as I'm not yet familiar with github actions. I'd be happy to have a PR if you feel like it though! :) Could you please open an issue first there github.com/maxime1992/dev-to-git/i... so we can discuss it and then we can talk about a PR
Thanks
Thanks for the coordination Maxime! Zak's ideas on id handling look comprehensive, they just need to be implemented) As for github actions, I'm not very familiar with that too, need to research, and I would be happy to contribute if I have enough time, you know. Added the issue to discuss further 👌
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:
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
Best thing ever!! Thank you so much for sharing 🙌🏻🙌🏻
Thanks for the kind words Priyanka 😊!
Hey sir! awesome post, just started posting on my own and I am following this approach.
Something that happened to me, and I want to share it here(I was looking among comments but did not find the same issue) was that the very first post worked like a charm in TravisCI!, but the second started to complain, I kept receiving this error message in TravisCI job log:
The
PUBLISHED
was a success every single time, theDRAFT
kept showing that error(odd, with a0
exited, so it was ok(?), or at least not affecting the status) till I manually set the published: true, then the next build the error was gone.Just wanted to share in case that this could be relevant for anyone else.
I'm having some issues with this. My github action was passing, but not posting, there were 422 errors in the log, then when I update the dependencies the action fails with log, 429 and 422 errors.
Any ideas?
github.com/toonarmycaptain/toonarm...
TIA.
Have a look here: github.com/maxime1992/dev-to-git/i... no fix so far but someone explained how he found the root cause at least
I'm not sure that's the issue - I have blank/empty cover image fields, since I haven't used one?
Thanks for creating this template! I am trying to implement it but I'm a little unsure on how to actually push the updates I make in my repo to dev.to. I tried to copy the file structures and updated the dev-to-git.json file with the draft post id and relative path, but when I make changes to the blog post .md file, I don't see the changes being made when I visit the post draft link on dev.to. Am I going about this the wrong way?
Do you mind providing a little more guidance on the steps after creating the blog post file?
FYI: I just started using git this month, so I'm a noob when it comes to using GitHub
Here's a link to my repo: github.com/maelingmurphy/my-dev.to
Thanks!
Hi Maeling, sure I'll help you out.
I've created an issue on your repo to avoid continuing the discussion here as it's probably not the best place :)
github.com/maelingmurphy/my-dev.to...
Thanks Maxime! Checking it out now
This is a great article. thanks for sharing Maxime.
I'm having trouble with my Travis CI build. It keeps failing when it gets to yarn:check
any ideas?
Hi, thanks for the kind words.
I've looked into your repo and apparently the latest commit is green on CI :). Is the issue gone?
Otherwise, can you please make sure to:
Let me know how it goes
Hey, I have one question regarding images that are used in posts. I have updated the image in section "2. Create a dev.to token". The PR already got merged. But the old image is still visible. I checked it in IE, too. As I never use IE, this browser can not have cached it.
So someone else must cache the image. I already stumbled across this problem when updating a cover image a few times. I had to rename it in order to see the changed image.
Do you know how this can be solved?
Hi Josef. Interesting. Can you please create an issue here github.com/maxime1992/dev-to-git ?
I think I've got an idea how we could fix this.
We could attach a param in the URL with the commit hash for ex that'd bust the cache :)
[x] done
Maybe I try a fix if I find some time
I know this is an old post now, but I thought I would share in case anyone stumbles across this. I created a simple Python script to automate the creation of the blog post folder and markdown file. I plan on having the script get the ID of the post as well, but that is for the future. Check it out here.
In the May I started to write a tutorial, I thought it will be 1 article, but it became 13 chapters :D
I don't want to publish and update them manually on site and on github. Thats how I found this article.
I didn't implement this idea yet, but I hope I can do that.
It should be noted here that private repository cannot host images for the article. User needs to use external image host or otherwise solve image upload to dev.to.
Great post! Git has truly revolutionized version control, making collaboration so much smoother. I particularly appreciate how Git branching allows for experimentation without risking the main codebase. For those looking to dive deeper, I've found that understanding Git's internal data structure—like how commits are stored as a chain—really helps in mastering more advanced features like rebasing. I've also written about some lesser-known Git tips that can streamline your workflow. Keep up the great work! GIT Training in Chennai
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.
Nice, thanks for sharing!
Great job! This allows you to have contributors and editors.
Definitely a good fit for that use case! 😁
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
Good Job! Awesome!!!
Wow! learn something new everyday!
Great, thank you very much
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)
Nice One! Thanks for sharing.
Thanks @maxime1992 , good job!
Much appreciated Carlos 🙏 thanks!
can you HELP im getting prettier dev-to-git.json errors !
full bug report here dev.to/osde8info/devto-autoposting...
Sure thing. I did reply on your post.
My blog also based on hugo.
I'm sorry I might be missing something but I do not understand what you mean, could you be more specific?
thats very awesome article,,
blog.boniw.io
where are you from
The option you suggested seems great but seems buggy. Only part of my blog post is "imported" (in the drafts)