-
-
Notifications
You must be signed in to change notification settings - Fork 0
Editing
berrywiki serve <folder> gives you an editor as well as a reader. It serves
no JavaScript at all — every interaction is a plain HTML form, and a test
asserts that no <script> element appears in any response.
That constraint shapes the design more than anything else on this page.
Open a page and click Edit. You get the Markdown source, and three buttons:
| Button | Effect |
|---|---|
| Save | Writes the page file. The sidebar is regenerated in the same operation. |
| Save draft | Stores your text outside the wiki, leaving the page untouched. |
| Preview | Renders what you typed. Writes nothing at all. |
There is no autosave, and this is deliberate rather than unfinished. A page serving no script cannot detect that you have gone idle, so "never lose a keystroke" could not be implemented honestly. Rather than ship a trust-critical feature that quietly did not work, BerryWiki offers explicit actions and makes unsaved state impossible to miss.
See Drafts and Stale Writes for what happens when a save is refused.
When a draft exists for a page, you see it whether or not you remember it:
- a banner on the editor, saying you are editing the draft rather than the saved page;
- a badge on the page view;
- a dot beside the page in the navigation tree.
Drafts live under your XDG state directory, keyed by a hash of the wiki path —
never inside the wiki clone. If they lived beside your pages, a git add -A
would commit and push your half-finished thoughts to GitHub. They also survive
the process being killed.
New page takes a title, a parent (or top level) and an optional body. The id is minted for you; the filename is derived from the title and its ancestors.
Delete asks for confirmation first, and refuses outright if the page still has children — move or delete them first. Deleting removes the file from your working copy; anything already committed remains in git history.
Both regenerate the sidebar in the same operation, so the tree and its navigation are never out of step.
-
Editing a
--githubmirror. That mode is read-only and shows no edit controls. - Resolving a body or metadata conflict. BerryWiki detects one, classifies it and shows you all three sides, but it will not merge the text for you. See Syncing and Conflicts.
Two entries that used to sit here have been removed because they are no longer true: moving a page with descendants is implemented, and committing and pushing are in-app. See Roadmap and Syncing and Conflicts.