Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

[Article as Code] Syncing Articles Between Dev.to and Multiple Blogging Platforms

Posted on Oct 3 In the world of content creation, each platform offers unique advantages. Publishing articles on various platforms helps us expand our audience. However, managing and synchronizing your articles across multiple platforms can become a tedious task.To address this need, I've developed an application called "Article as Code," which boasts several key features:You will need to create the following secrets:To automate the synchronization process, we'll set up a GitHub Action workflow. Create a new file named .github/workflows/cronjob.yml in your repository with the following contents:This GitHub Action will run every 6 hours or whenever you push a new commit to the main branch. Here's what it does:Collect all your articles from dev.to then store into the articles folder.Sync articles to dev.to (In this case, it's redundant, but it will cover the scenario when you write a new Article by committing directly to this repository.)Sync articles to hashnode.devThis is the "single source of trust" that stores all my articles.It utilizes huantt/article-as-code to collect, store, and sync all my articles to various platforms, including dev.to and hashnode.dev.The docker-compose.yml file helps us run the flow locally.To run this Docker Compose, create a .secret.txt file and fill in the following variables:Run the following command:I have created a GitHub action in the .github/workflows directory that runs every 6 hours or whenever you commit to the main branch.AAC a.k.a. Article as Code helps you collect articles from data sources, such as dev.to, and then stores them as static files.It also helps you sync static files to create articles on your publications.Add GOPATH/bin directory to your PATH environment variable, so you can run Go programs anywhere.For exampleFor…I will appreciate it if you contribute to support other platforms.Templates let you quickly answer FAQs or store snippets for re-use.great article, thanks so much. Got a question. I get this error in my actionsRestore cache failed: Dependencies file is not found in /home/runner/work/articles/articles. Supported file pattern: go.sumAlso, I created the articles subfolder as well so the articles are added to it but though the job runs and shows that error i mentioned, the folder still does not get filled up with the articles. Any idea why? Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Grace Valerie - Sep 24 BladeArya - Oct 2 Nenba Jonathan - Sep 23 Mohit kadwe - Oct 1 Once suspended, jacktt will not be able to comment or publish posts until their suspension is removed. Once unsuspended, jacktt will be able to comment and publish posts again. Once unpublished, all posts by jacktt will become hidden and only accessible to themselves. If jacktt is not suspended, they can still re-publish their posts from their dashboard. Note: Once unpublished, this post will become invisible to the public and only accessible to Jack. They can still re-publish the post if they are not suspended. Thanks for keeping DEV Community safe. Here is what you can do to flag jacktt: jacktt consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy. Unflagging jacktt will restore default visibility to their posts. DEV Community — A constructive and inclusive social network for software developers. With you every step of your journey. Built on Forem — the open source software that powers DEV and other inclusive communities.Made with love and Ruby on Rails. DEV Community © 2016 - 2023. We're a place where coders share, stay up-to-date and grow their careers.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

[Article as Code] Syncing Articles Between Dev.to and Multiple Blogging Platforms

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×