Alright, let’s get meta. This blog is about DevOps and Git—so I’m kicking it off by showing you how I ship this blog. With ghostpost, a tool I built that lets me publish to Ghost the same way I manage code: in Git.
You use Ghost because it’s modern, open, and built for professional creators. It gives you newsletters, subscriptions, and a full publishing stack that doesn’t sell your soul to adtech.
You use Git because you want version history, branches, and working with the all mighty plain text.
ghostpost is a GitOps-style CLI for managing Ghost posts.
Each post lives as a Markdown file in your repo. The front-matter stores all metadata—including the Ghost post_id.
You edit locally. You commit. ghostpost publishes.
I wanted a writing workflow that matched how one might ship code.
The Ghost GUI becomes just a preview tool. Nothing gets edited in it.
Not necessarily a new idea—post2ghost laid out the same "Articles as Code" concept where content belongs in Git. The CMS should be a rendering layer, not an editing platform.
That post nailed the philosophy:
It was still a bit DIY and python based which is a dependency headache -- I love python, but not for cli tools...
ghostpost takes that same idea and wraps it in a clean CLI. One command and simple.
You write a post in Markdown, with front-matter like this:
---
title: Your title here
slug: your-slug
custom_excerpt: Short summary here
tags: [DevOps, Ghost]
feature_image: images/cover.jpg
status: draft
---
Your content in Markdown.
Then you run:
ghostpost publish -f /path/to/post.md –editor
The tool takes care of:
There’s no runtime. No daemon. No need to open the CMS.
git log, pull requests, inline diffs, CI checks.ghostpost uploads and rewrites them for you.Here’s a basic example using GitHub Actions:
# .github/workflows/publish.yml
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ghostpost publish -f posts/hello-from-git.md –editor
Because once you’ve versioned your posts, previewed with Markdown, and deployed with a single command—there’s no going back.
No clunky editors. No missing history. No surprises.
Check out the repo and the readme at https://github.com/rodchristiansen/ghost-gitops-publishing
Install the binary, connect it to your Ghost API, and start treating your writing like the rest of your infrastructure: reproducible, testable, and versioned.