Almost a year ago, I wrote about how I created a CLI tool to cross-post articles to Dev.to, Hashnode, and Medium. I created the tool because it made the process easier for me, but I also received a lot of feedback from other writers about how it was helpful for them.
Since then, I haven't been able to maintain it much due to my busy schedule. Now, I'm taking more time to commit to it and improve it with the help of the community.
On Monday, the 28th of February, I pushed out a new release of
cross-post-blog with the version
1.3.0. I'll be sharing some of the features and fixes it includes. You can also check out the GitHub repository for more information about the library.
If you're reading this article on Dev.to, Hashnode, or Medium, then it is reposted from my own blog using the Cross-Post CLI tool!
Based on demand from some of the developers using this library, I've now added the ability to post directly from a local file instead of a public URL. To do that, you simply need to add the
--local option to your command.
cross-post run /path/to/test.md -l
This will post a local file
test.md to all of the platforms.
You can also use it with all of the options you previously used.
Each of the platforms requires you to send the content of your article to post in Markdown format. So, when you pass a URL to the command, the content of the article on that page is converted to Markdown before submitting it to the platform you want to post on.
The new version is now using
turndown instead, which does a better job of parsing code blocks. Your articles should now be posted to the different platforms almost exactly as you have it posted on your own blog.
Previously, you could set a default article and image selectors in the configuration. You could also override those configurations in the
N0w, you can also set the default title selector in your configuration:
cross-post config titleConfig
Or, pass it as an option
--title-selector to the
cross-post run <url> -ts .post-full-title
I'll be working from now on to improve the tool and add new features, either from the request of developers using this tool or from my own experience using it. For example, a feature that has been requested is the ability to update posts.
I'm also going to look into adding new platforms to enable posting to. If you have any platform in mind that you think would be good to add please do let me know!
If you want to install and start using Cross-Post or update your version you can install it with NPM:
npm i -g cross-post-blog
Please check the README for more information on installing and using this tool.
At the moment, there's no contribution guideline added in the repository (I'm working on that). However, if you would like to contribute to any of the existing issues or add new features, then please don't hesitate!