Comments on news posts: one forum discussion per post

oc:pages command in the forum extension, tools/forum_sync.py and
'make forum-sync' (run by deploy) keep data/forum_pages.json up to date;
post pages end with their discussion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-11 22:22:20 +02:00
co-authored by Claude Opus 5.5
parent 418913d47e
commit 785c4967be
12 changed files with 243 additions and 31 deletions
+11 -1
View File
@@ -6,7 +6,7 @@ frame.
| Path | Role |
|---|---|
| `extension/` | Flarum extension `oc/flarum-museum`: the `oc:import` command and the look of embedded threads |
| `extension/` | Flarum extension `oc/flarum-museum`: the `oc:import` and `oc:pages` commands, original author names, the look of embedded threads |
| `docker/`, `docker-compose.yml` | local test forum; `docker/bundle.sh` packages the server bundle |
| `import/` | not versioned: `machines.json` (export from the extraction repo), `forum.json` (thread map), `forum.tar.gz` (server bundle) |
@@ -33,6 +33,16 @@ frame.
- With `params.forum.url` set, the bottom of the machine's pages shows `<forum>/embed/<id>` (Flarum's Embed
extension) in a frame that follows the height of the thread.
## News posts
`php flarum oc:pages` creates one discussion per news post under the tag News (listed with the
other forum topics, unlike the machine threads), opened by the system account `News` with a
link to the post. `make forum-sync` in the website repository drives it: `tools/forum_sync.py`
sends the list of published posts to the forum host (`FORUM_RUN`, `FORUM_DIR`, `FORUM_PHP` in
the Makefile) and stores the answer in `data/forum_pages.json`. `make deploy` runs it first, so
a new post gets its discussion when it is published. A post that is renamed gets a new
discussion; a retitled one keeps its discussion and its old title there.
## Local test
make forum-up # http://localhost:8081, admin / adminadmin (first start takes a minute)