Discourse Wiki Coeditors

Install this theme component

Discourse keeps every wiki edit, but never shows who contributed. This component lists them under the post, so the people who keep a wiki up to date get credit for it.

What it does

  • Shows “Co-edited by” and the editors’ avatars under the first post of a wiki topic.
  • Ranks editors by how many edits they made in recent revisions. The post’s author, system and discobot aren’t listed.
  • Opens each person’s profile card on click.
  • Past a set number of avatars, the rest go behind “+N more”.
  • Works for signed-out visitors: a wiki’s edit history is public even with edit_history_visible_to_public off.
  • English and Spanish localizations are included.

Settings

Setting Default
target_categories empty Categories whose wikis show the list
target_tags empty Tags whose wikis show the list, in any category. With no categories or tags set, every wiki shows it.
label empty Text before the avatars. Empty uses the viewer’s language.
label_overrides none Different wording per category
excluded_users empty Usernames never listed
max_avatars 5 Avatars shown before “+N more”
max_revisions 20 Recent revisions read, up to 40

Known limits

  • One request per revision on each view, so only recent revisions are read: earlier editors of a heavily edited wiki drop off. The cap is 40 because Discourse blocks a visitor past 50 requests in 10 seconds by default.
  • Other bots, such as AI ones, can’t be detected automatically: they needs to be added to excluded_users.
  • Any revision counts, including one that only changed the title, tags or category.
  • Only the first post is credited.
  • excluded_users only hides names. Their edits stay in the post’s history.

For a leaderboard instead of per-post credit, the README includes a Data Explorer query. Bug reports and PRs are welcome.

2 Likes