GitGhost
Automate git-based backups of your Ghost CMS content and metadata.
Install / Use
/learn @sharedphysics/GitGhostREADME
GitGhost
_____ _ ____ _
/ ____|(_) _ / ___| | | _
| | __ _ | |_ | | __ | |___ ___ ___ | |_
| | |_ || || __| | | |_ || __ |/ _ \/ __|| __|
| |__| || || |_ | |__| || | | | (_) \__ \| |_
\_____||_| \__| \_____||_| |_|\___/|___/ \__|
╔══════════════════════════════════════════════╗
║ Human-Readable Backups of Your Ghost Content ║
╚══════════════════════════════════════════════╝
GitGhost is a python/shell script lets you automate git-based .html backups of your Ghost CMS content and metadata.
I created GitGhost after noticing that a lapsed card on my AWS account meant that my entire Ghost installation was almost erased. My server-based backups would have been erased too, which drove home the need for 3rd-party backups.
Getting Started
GitGhost works by accessing your Ghost API to pull down JSON content, then iterating through that content to create a browsable directory with .html files. It also creates a full .json backup for you to manipulate later if needed.
Create a Custom API
In the Custom Integrations area (yourdomain/ghost/#/settings/integrations), click on + add a custom integration and give it a name.
Copy the Content API Key and the API URL.
Set Up the Python Script
-
In
GitGhost.pyline 6, set your request.get() url to be:[YOUR DOMAIN]/ghost/api/v3/content/posts/?key=[CONTENT API KEY]&include=tags,authors&limit=all' -
GitGhost has a few dependencies. Run
pip install -r requirements.txtin your GitGhost directory to set them up. -
If you want to configure what metadata is being written, you can adjust it from available variables here: (https://ghost.org/docs/api/v3/content/)
Running the Script Locally
To run the script one time & save locally, type the following in your GitGhost directory:
python3 GitGhost.py
Running & Committing to GitHub
To run the script & commit to github, clone this GitGhost repo & give it a new name. I recommend [YOURSITE-Backups] because that will make it super clear what you're pushing to.
Copy/open the new repo to your computer and cd into it.
Make the automate.sh script actionable by typing:
chmod +x automate.sh
Then run the script as ./automate.sh
Coming Soon
- Update API URL with variables
- Create folder structure for scripts/published posts/draft posts
- Write a full backup
backup.jsonfor full restores - Pull down and save actual images from post
- Pull down drafts as well
- Pull down
- Writing more metadata from posts.
- Writing settings as a backup.
- Creating a .html index to navigate your posts locally, because why not?
Related Skills
docs-writer
99.6k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
341.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
ddd
Guía de Principios DDD para el Proyecto > 📚 Documento Complementario : Este documento define los principios y reglas de DDD. Para ver templates de código, ejemplos detallados y guías paso
arscontexta
2.9kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
