Publish from github to WordPress

I would love to be able to compose articles, save them in Git (on Github) and then push them to WordPress to publish them.

A better composer

I’ve been using a combination of different editors to write articles for Kerr.io and recently settled on two: IA Writer and Prose.io. IA Writer is a Mac writer than can save documents in the local file system or on iCloud. (Or Dropbox/Box.net/Google Drive if you’ve enabled syncing.) Prose.io on the other hand is a web based editor that can only edit documents on Github.

Using git for version control

Git is a great tool to use to add version control to your blog articles and it works with both IA Writer and Prose.io. You can either edit your articles locally or directly on Github using any git based workflow. This is perfect for me because it allows me to work from any system without the need for having special tools.

[[code]]czo1MzpcIiBnaXQgY29tbWl0IC1tIFxcXCd0aGlzIGlzIGEgbmV3IGFydGljbGUgZm9yIG15IHNpdGVcXFwnIFwiO3tbJiomXX0=[[/code]]

How do I get it into WordPress?

The big issue for me is how can I get these blog articles into WordPress? Currently I have to copy and paste them which is a bit of a chore. Github has a posthook capability for when you commit and push updated content, but I haven’t figured out how to get WordPress to receive the hook. (If you have a better solution for using posthooks, please contact me or post it in the comments below.) Screenshot Then I got around to thinking about using a third party service to syndicate the content for me. This is where ifttt comes into play. With ifttt I can use Github as a source, consume its feed and then auto post new content when new feed items are added. So I configured Github to host a site from one of my repositories (it will host Jekyll sites pretty easily.) Then I added the Jekyll atom xml file to the ifttt feed and told it to auto-publish new feed items to my WordPress site. One of the nice features about using Jekyll as an intermediary is that I can take advantage of the “published” metadata so that when I’m composing a draft, even though I’ve saved it to my github repository, it won’t post to WordPress until I set that metadata value to “true”. Now I’ve got a great way to use Github to source articles whose destination is my WordPress blog. Next step is to write a true WordPress plugin that would allow me to not only write new posts, but edit existing posts without the need to use ifttt as an intermediary.

Published by joshkerr

Josh is an 8x startup founder and angel investor.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.