Using “Git it write” WordPress plugin, you can publish markdown
Using “Git it write” WordPress plugin, you can publish markdown present in a Github repository.
Since posts are published from a Github repository, you should have a public Github repository. Please check github docs on how to create a Github repository if you are new to it.
Once you have a Github repository (or if you wish to pull from another public repository) you can configure Git it write plugin on the same. Your repository will have an owner and the name of the repository itself. This information is used to configure in the plugin settings page.
It does not matter if your repository is new, empty, old with files already. Below configuration can be done anytime.
Github Webhook allows to notify the plugin whenever the files in the repository are modified. This allows the plugin to fetch the latest changes automatically and publish/update the posts automatically without any manual need to pull posts.
If you do not own the repository then you cannot configure webhooks. Also if you do not wish to automatically update posts, then you can skip configuring the webhook.
Webhook is now configured. So whenever repository changes, the payload URL will be notified and the plugin will take care of adding/updating the posts.
Markdown is a simple markup language which allows to easily write formatted text. Please refer markdown guide for more information on the syntax. Markdown files end with
.md file extension.
You can now organize the files in folders as you need and write your posts using markdown format.
See writing posts page for more information on this.
Whenever you commit and push the changes or pull changes to the repository the Github will notify the plugin and the plugin will automatically publish the posts by reading the markdown files from the repository as HTML post content.
In Git it write settings page every repository has option to manually pull the posts to publish. The “Pull posts” link can be seen under the repository name in the table when the row is hovered over.
There are two types of pull:
When posts are published by the plugin, all the file-by-file activities are logged. The logs can be seen using the “Logs” link in the settings page. This is helpful to debug and get to know when posts are published.