During my Christmas break, I’ve turned WordPress into a markdown editor, a git client, and a git server. It’s all dependency-free PHP code. It works in Playground, on any cheap hosting, and it could be merged into WordPress core.
Why would I do that?
I want Notion that’s free, offline first, and where I own my data. I also want to collaborate with my wife and my improv group. WordPress is the perfect foundation, the hosted version solves many of my problems, but I really want to version my data as static files.
The demo
A non-video summary
- I’m dragging and dropping content and media files in and out of WordPress (markdown and HTML is supported today).
- Saving a page in WordPress changes that file in my local directory.
- All WordPress changes are synchronized with a GitHub repo.
- Also, WordPress is a git repo. I’m running
git pullandgit pushwith my content files directly against WordPress.
Use-cases
- Synchronization: Push/pull data to another site. There’s no conflict resolution in place yet, but this work is a major stepping stone towards the Site Transfer Protocol.
- Git as a content database: Developers love maintaining docs in git. With this, WordPress can serve documentation pages directly from a Git repository without convoluted synchronization pipelines. That’s less Docker, less custom scripts, and less problems. And every page can have a public “edit in Playground” button where saving a page starts a new PR – see WordPress for Docs.
- Deployments: Push code changes directly to your WordPress site to update a plugin or a page. Also, imagine multiple branches:
code, where you can push new plugins, andcontent, where you can push/pull new posts and pages. - Static file editor: Open a local directory in WordPress, make some changes, and see them reflected in your files – similar to Ryan Welcher’s VS Code plugin WordPress Playground markdown editor.
- Static site generator: Why use Jekyll when WordPress has Gutenberg? Edit in WordPress, click, and everything becomes a static site. Or do it in GitHub CI.
- Easy start for developers: A few
.mdor.htmlfiles are all you need to spin a meaningful WordPress site. Sprinkle a Blueprint, and you’ll get plugins, more blocks, and a fancy theme.
The code
My messy, work-in-progress PR needs a lot of cleaning up and documenting before you’ll be able to use it and easily install on your site. I’ll post an update once that’s possible. If you really want to play with it today, see the Blueprint I used to create the site on the video.
Leave a ReplyCancel reply