So, like all good things, the idea for this post comes from a tweet:
This is something I've been ruminating on for a bit. I've even tried to build it - a few rtimes! I keep starting in on the work and getting lost in the millions of directions I could take it.
Here's what I'd like: When I publish a new post to my gatsby site, I'd like for that post to appear here on dev.to automatically.
- recreate my post verbatim, from its original markdown source
- use the
canonical_urlfrontmatter field to make sure I retain SEO goodness on my post
- happen without my intervention
- be agnostic of where my posts are coming from. I use takeshape.io as a headless CMS for my site, so my individual posts aren't in source control
- only take posts from my
masterbranch, since I use feature branches for draft posts from time to time
- use the dev.to API, of course
- maybe posts should be set to
published: falseat first, so I can preview/review/update them as needed for dev.to?
- Tap into GitHub's webhooks somehow, and fire off a post here
- Come from a job kicked off after CI, maybe? I use CircleCI, but would like this feature to be fairly implementation agnostic.
- Use a GitHub App?
- or a GitHub Action?
- Perhaps just a lamba function deployed to AWS or Netlify Functions.
So - here's where I ask for your help. Surely there's a simple approach here I haven't thought of, or maybe it's a matter of collecting a few scenarios and building something based on 80/20.
What else am I missing here? I'd love your help. What use cases would you have for a crossposter from your gatsby site? How would you implement it? How can we help each other?
Haven't created your DEV account yet?