gitwtfhub

wtf is emdash-plugin-github-backup?

dennisklappe/emdash-plugin-github-backup — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 2/5Setup · moderate

TL;DR

Automatically backs up emdash CMS content edits to a GitHub repo as commits, turning database changes into a versioned git history.

Mindmap

mindmap
  root((repo))
    What it does
      Backs up CMS edits
      Writes JSON per entry
      Deletes tracked too
    Tech stack
      TypeScript
      GitHub Contents API
    Use cases
      Content audit trail
      Recover deleted entries
      Track editor changes
    Audience
      emdash site owners
      Plugin developers
    Setup
      Needs GitHub token
      Config via env vars

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Keep a version history of CMS content edits stored outside of git.

REASON 2

Recover a deleted piece of content from a past commit.

REASON 3

Audit who changed which piece of content and when.

What's in the stack?

TypeScriptGitHub APIemdash CMS

How it stacks up

dennisklappe/emdash-plugin-github-backup0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity2/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a GitHub token with write access to the target backup repository.

No license information was stated in the README.

Wtf does this do

This project is a plugin for emdash, a content management system that stores its content in a database rather than in git. Normally that means edits made by an editor never show up as file history anywhere. This plugin closes that gap by copying every content change into a GitHub repository, so the repository's commit history becomes a record of who changed what and when. Whenever a piece of content is created or updated, the plugin writes a JSON file for that entry into a folder in your chosen GitHub repo and commits it. It is smart about not creating duplicate commits: emdash sometimes fires its save event twice for a single edit (once for a draft, once for publishing), so the plugin compares the new content against the last backup and skips the commit if nothing meaningful actually changed. When content is deleted, the corresponding file is removed from the repo, though the old version stays recoverable through git history. If the plugin cannot figure out which file to delete, it writes a small placeholder file instead so the deletion is still logged. Commits are attributed carefully: by default they are credited to a neutral, no reply GitHub account rather than whichever person's access token was used, which avoids a confusing phantom user showing up in your commit list. When the plugin can identify the actual editor from the content's assigned author field, it will credit that person as the commit author instead. Setup involves installing the package, adding it to your emdash configuration with a target GitHub owner and repo name, and supplying a GitHub token with write access to that repository, either through settings, environment variables, or plugin options. If the token or repo details are missing, backups are simply skipped and your content save still goes through normally, so a backup problem never blocks an editor from saving work. It also attempts to copy any media files referenced in your content, though this only works when certain conditions are met. This is an independent, unofficial plugin, not built or endorsed by the emdash project itself.

Yoink these prompts

Prompt 1
Show me how to add emdash-plugin-github-backup to my emdash config with an owner and repo name.
Prompt 2
Help me set up a GitHub token with the right permissions for this backup plugin.
Prompt 3
Explain how this plugin avoids creating duplicate commits when emdash saves a draft then publishes it.
Prompt 4
Walk me through what happens in this plugin when a piece of content is deleted.

Frequently asked questions

wtf is emdash-plugin-github-backup?

Automatically backs up emdash CMS content edits to a GitHub repo as commits, turning database changes into a versioned git history.

What language is emdash-plugin-github-backup written in?

Mainly TypeScript. The stack also includes TypeScript, GitHub API, emdash CMS.

What license does emdash-plugin-github-backup use?

No license information was stated in the README.

How hard is emdash-plugin-github-backup to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is emdash-plugin-github-backup for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.