Skip to content
BearMinion

← Blog

Undo anything, and bring back any saved version

Two tabs: every step since you opened the page, and every saved version of your content and images. Compare one field by field, then restore a page or all of it.

Clients will delete the wrong paragraph. You will too. Since 1.26, History in the editor is built on the one record your site already keeps: git.

Update

History lives in the editor, so there's no section to update. Install the latest release and restart npm run dev:

npm install bearminion@latest

Two tabs

Click the clock in the top bar and the History panel opens over the page, with two tabs.

  • This session lists every step you made on this page since you opened the tab, newest first. Go back on any step returns the page to that point. The list goes away when you close the tab.
  • Commits lists the repository's commits of your content and images. Locally that's what you've committed; in the hosted editor every save is a commit.

Compare and restore

Open full history in the Commits tab, or History in the editor's navigation, opens the full History screen. Pick a version and it shows what that commit changed, field by field: the old heading next to the new one, not a JSON diff.

The History screen: saved versions on the left, what one changed on the right, with Restore
Saved versions on the left; on the right, what the selected one changed, field by field.

Then Restore one page or everything in that version. A restore is a new save on top, never a rewrite of what came after, so restoring the wrong thing is itself one restore away from fixed. It works the same in local git and in the hosted editor on GitHub.

Since 1.27 the list also names changes to navigation and footer links properly, instead of a generic "site changed".

What went away

The old save copies in .editor/history/ and the /history API are gone; git is the history now. If you still have an .editor/history/ folder, nothing reads it any more. Delete it once you're sure you don't need a copy from it.

Why git and not a database

Your content is already JSON in your repo. A second store of versions next to it would be one more thing to drift out of sync. Commits are what you'd review in a pull request anyway, and the History screen is a readable view of them.

More in the editor docs.

Wake the minion.

Run one command, answer three boring questions and watch it do the rest. Template copied, dependencies installed, first commit done.

Now it gets out of your way so you can actually work.

  1. npm create bearminion@latest
  2. Created My Site in my-site
  3. Installed dependencies
  4. →Next: cd my-site, npm run dev