Research: content model and moderation (no wiki engine embedded; Divan text format) #49
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "research/content-model"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #38. Step 5 of the plan. A research PR: please read
docs/content-model.md; the code is a tested prototype that later steps build on.Question: moderation like a wiki, with tags for what a couplet, stanza, chapter and word are, and whether an open-source wiki content-management module can be integrated.
Finding (checked October 2026): no wiki engine is a good fit to embed.
Recommendation
Divan text: a small, Wikisource-compatible markup as the published source in divan-data, one file per work.
{{دیوان | …}}for data points;<poem>: 2 lines = couplet, 1 = misra, 3+ = stanza;== … ==for chapters;[[word]]for dictionary links,<ref>for footnotes,{{نسخہ|…}}for variant readings.Git diffs stay readable: a one-word fix in a misra is a one-line diff (shown in the doc against the JSON export).
The moderation workflow (drafts, L2 → L1 → admin, comments) lives in PostgreSQL. Publishing commits the
.dtxfile with Reviewed-by/Approved-by trailers.Editors: a Tiptap structured Urdu editor and a CodeMirror source view.
Wikisource sync through wikiparser-node; Divan-published works are never overwritten.
TEI export (a couplet is
<lg type="sher">with two<l>).Prototype (
api/src/divantext.ts, tests indivantext.test.ts, samples indocs/content-model/): parses Divan text, converts it to the site's verse JSON, and exports TEI.npm test: 32 pass.Decisions for the owner: accept Divan text as the published format and Tiptap as the editor base. The next steps (#30, #31, #32, #41, #28, #34) follow the doc's "Effect on the plan".
🤖 Generated with Claude Code