1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 |
# Patchwork
Your RSS feed tells readers what you published. Patchwork tells them what you changed.
Patchwork keeps the version history of the pages you revise and publishes each revision you choose to announce as a feed entry. An entry carries your note, the kind of change, how grown the page is, and a readable diff of the passages that changed. It's meant for digital gardens, living notes and documentation: pages that keep growing after their first publication.
> Status: early development. The core (versions, diffs, publish rules) is being built; feeds and the HTTP API come next. Nothing here is stable yet.
## How it works
Patchwork watches a folder of Markdown files. When a file changes, it stores a snapshot in SQLite. A snapshot becomes a public revision only when you say so, by adding a note to the frontmatter:
```yaml
---
title: Remote work
revision: "Two years in, I changed my mind about the hybrid model."
revision_kind: position # correction | expansion | position | reorganization
maturity: sprout # seed | sprout | bloom
---
```
Edits without a new note are kept as history and never reach the feed, so fixing a typo makes no noise. Several quiet edits followed by one with a note show up as a single revision, diffed against the last one you published.
Patchwork then serves (or exports as files):
- an Atom feed and a JSON Feed of revisions, for the whole site and for each page;
- a JSON API with each page's history, every published version, and structured diffs your site can render in its own style.
The first site using it is [moonflowersociety.org](https://moonflowersociety.org), a nocturnal garden of ideas.
## Install
```sh
go install git.pablomurad.com/pablo/patchwork/cmd/patchwork@latest
```
## License
MIT. See [LICENSE](LICENSE).
|