ZMediumToJekyll|Seamlessly Migrate and Sync Medium Posts to Jekyll Blogs
Effortlessly transfer your Medium articles to a Jekyll blog while maintaining future synchronization, solving content migration and update challenges for bloggers and developers.
点击这里查看本文章简体中文版本。
點擊這裡查看本文章正體中文版本。
This post was translated with AI assistance — let me know if anything sounds off!
Table of Contents
ZMediumToJekyll
Move your Medium posts to a Jekyll blog and keep them in sync in the future.
This tool can help you transfer your Medium posts to a Jekyll blog and keep them synchronized in the future.
It will automatically download your posts from Medium, convert them to Markdown, and upload them to your repository. Check out my blog for an online demo zhgchg.li.
One-time setting, Lifetime enjoying❤️
Powered by ZMediumToMarkdown .
If you only want to create a backup or auto-sync of your Medium posts, you can use the GitHub Action directly by following the instructions in this Wiki .
Setup
- You can follow each step of this process by watching the following video tutorial
Click the green button
Use this templateabove and selectCreate a new repository.Repo Owner can be an organization or username.
Enter the Repository Name, usually your GitHub Username/Organization Name followed by
.github.io. For example, if my organization name iszhgchgli, it will bezhgchgli.github.io.Choose the
publicrepository option, then clickCreate repository from template.Allow access to GitHub Actions by going to the
Settingstab in your GitHub repository, selectingActions->General, locating theWorkflow permissionssection, selectingRead and write permissions, and clickingSaveto apply the changes.
*If you choose a different Repository Name, the GitHub page will be https://username.github.io/Repository Name instead of https://username.github.io/, and you will need to fill in the baseurl field in _config.yml with your Repository Name.
*If you are using an organization and cannot enable Read and Write permissions in the repository settings, please refer to the organization settings page and enable it there.
First-time run
Please refer to the configuration information in the section below and make sure to specify your Medium username in the
_zmediumtomarkdown.ymlfile.⌛️ Please wait for the
Automatic Buildandpages-build-deploymentGitHub actions to finish before making any further changes.Then, you can manually run the ZMediumToMarkdown GitHub action by going to the
Actionstab in your GitHub repository, selecting theZMediumToMarkdownaction, clicking on theRun workflowbutton, and selecting themainbranch.⌛️ Please wait for the action to download and convert all Medium posts from the specified username, and commit the posts to your repository.
⌛️ Please wait for the
Automatic Buildandpages-build-deploymentactions to finish before making any further changes. They will start automatically once the ZMediumToMarkdown action has completed.Go to the
Settingssection of your GitHub repository and selectPages. In theBranchfield, selectgh-pages, and leave/(root)selected as the default. ClickSave. You can also find the URL for your GitHub page at the top of the page.⌛️ Please wait for the
Pages build and deploymentaction to finish.🎉 After completing all actions, you can visit your xxx.github.io page to verify the results. Congratulations! 🎉
*To avoid expected Git conflicts or unexpected errors, please follow the steps carefully and in order, and be patient while waiting for each action to complete.
*Note that the first run may take longer.
*If you open the URL and notice that something is wrong, such as missing web styles, please make sure your configuration in the _config.yml file is correct.
*Please refer to the ‘Things to Know’ and ‘Troubleshooting’ sections below for more information.
Configuration
Site Setting
_zmediumtomarkdown.yml
1
medium_username: # enter your username on Medium.com
Please specify your Medium username for automatic downloading and syncing of your posts.
_config.yml & jekyll setting
For more information, please refer to jekyll-theme-chirpy or jekyllrb .
Github Action
ZMediumToMarkdown
You can configure the time interval for syncing in ./.github/workflows/ZMediumToMarkdown.yml.
The default time interval for syncing is once per day.
You can also manually run the ZMediumToMarkdown action by going to the Actions tab in your GitHub repository, selecting the ZMediumToMarkdown action, clicking the Run workflow button, and choosing the main branch.
Disclaimer
All content downloaded using ZMediumToMarkdown, including but not limited to articles, images, and videos, are subject to copyright laws and belong to their respective owners. ZMediumToMarkdown does not claim ownership of any content downloaded using this tool.
Downloading and using copyrighted content without the owner’s permission may be illegal and could lead to legal consequences. ZMediumToMarkdown does not endorse or support copyright infringement and is not responsible for any misuse of this tool.
Users of ZMediumToMarkdown are solely responsible for ensuring they have the necessary permissions and rights to download and use any content obtained with this tool. ZMediumToMarkdown is not liable for any legal issues resulting from misuse of this tool.
By using ZMediumToMarkdown, users acknowledge and agree to comply with all applicable copyright laws and regulations.
Troubleshooting
My GitHub page keeps presenting a 404 error or doesn’t update with the latest posts.
Please make sure you have followed the setup steps above in order.
Wait for all GitHub actions to finish, including the
Pages build and deploymentandAutomatic Buildactions. You can check the progress on theActionstab.Make sure you have the correct settings selected in
Settings -> Pages.
Things to know
The
ZMediumToMarkdownGitHub Action for syncing Medium posts runs automatically every day by default. You can also manually trigger it on the GitHub Actions page or change the sync frequency as needed.Every commit and post change will trigger the
Automatic Build&Pages build and deploymentaction. Please wait for this action to finish before checking the final result.You can create your own Markdown posts in the
_postsdirectory by naming the file asYYYY-MM-DD-POSTNAMEand it is recommended to use lowercase file names.You can include images and other resources in the
/assetsdirectory.Also, if you would like to remove the ZMediumToMarkdown watermark located at the bottom of the post, you may do so. I don’t mind.
You can edit the Ruby file at
tools/optimize_markdown.rband uncomment lines10–12. This will automatically remove the ZMediumToMarkdown watermark at the end of all posts during Jekyll build time.Since ZMediumToMarkdown is not an official tool and Medium does not provide a public API for it, I cannot guarantee that the parser target will remain unchanged in the future. However, I have tested it with as many cases as possible. If you encounter any rendering errors or Jekyll build errors, please feel free to create an issue, and I will fix them as soon as possible.
If you have any questions or suggestions, feel free to contact me.
This post was originally published on Medium (View original post), and automatically converted and synced by ZMediumToMarkdown.
