DEV Community

Discussion on: Want to crosspost to dev.to? There's a GitHub action for that.

Collapse
 
basicbrogrammer profile image
Jeremy Ward 😎🤓

I'm planning on adding hashnode and medium since they allow posting markdown. If you want to take a wack at one of those or have ideas to make it better send me a PR github.com/basicBrogrammer/crosspo...

Warning I haven't added tests yet :( lol but its a WIP
Bug I noticed today It reposted one of my previous posts bc I updated it. I need to figure out a way to decide to do a POST or a PUT for the articles 🤔

Collapse
 
stereobooster profile image
stereobooster

In my blog when I crosspost to another platform I add id to the front matter (see example here). My blog doesn't have comments instead I have links in the bottom, which says "discuss on dev.to" and it links to my crossposted article on dev.to.

So one way to handle it is to update frontmatter and commit again

Thread Thread
 
basicbrogrammer profile image
Jeremy Ward 😎🤓

nice update the frontmatter to include the dev.to (other platform) link and queue off of that 👍 I dig it.
Also, I'm gonna steal your "discuss" idea bc my site doesn't have comments either 🤣

Thread Thread
 
basicbrogrammer profile image
Jeremy Ward 😎🤓

Did some quick refactoring to handle the POST or PUT. The Action will print out the dev.to slug and id and those can be added to the front matter (devToSlug and devToId respectively) I'll cut a release tomorrow morning 👍
github.com/basicBrogrammer/crosspo...