m2w
Tools
Open Source
Sync
WordPress
m2w
Sync Markdown to WordPress posts
Note
This repository is inspired by and forked from WordPressXMLRPCTools with the author’s permission under GNU General Public License.
The original repository is used by the author to update his WordPress posts and therefore contains a lot of commits. To make it cleaner, I decided to start a new repository and copy the essential files here.
Please refer to the original repo for the author’s motivation and philosophy of this project
Quick start
This repository is just a code base. To use it, please go to m2w-example and click “Use thie template” to create a repository for your own WordPress.
In the repo you just created using the template:
-
Add the following GitHub Actions secrets
-
USERNAME
your WordPress username -
PASSWORD
your WordPress password -
XMLRPC_PHP
the url of yourxmlrpc.php
. Usually it ishttps://your-domain.com/xmlrpc.php
-
M2W_VERSION
the version of m2w (this repo). The latest version is recommended. You can go to Releases/Tags to find tag name you want to use as well -
ENABLE_DELETION
whether to delete the corresponding WordPress post when the Markdown gets deleted. Feel free to skip it if you don’t want to enable deletion
-
-
Clone the repo to your local and stay on
main
branch -
Add/modify/delete your post in
posts
directory - Commit the changes to GitHub as you did for other repositories
- Wait for the GitHub Actions to complete
- Done! 🎉
Tips
-
Don’t forget to
git pull
when the GitHub Actions is done, since it adds a new commit on GitHub. I sometimes forget about it and commit my changes, then there will be a conflict -
Feel free to modify the README as long as
---start---
,---end---
and the lines in between are kept untouched