I’d like to request that the admins look into adding sortable tables to the forum. TBH, I’m not sure how much use this feature would get, but it would be fun to play with and could be a boon to folks publishing tabular information. Anyway, ChatGPT sez:
Option 1 — Use a lightweight JS library (works on GitHub Pages, most static sites)
This is the most common and portable approach.
Minimal setup with Tablesort
Add this to your page (or site template):
Then just write your Markdown table normally:
Name Age Score Alice 30 88 Bob 25 95 Carol 27 91
When rendered, click column headers to sort.
Why this is nice
No changes to your Markdown
Works on GitHub Pages (Jekyll, etc.)
Very small and fast
…
Option 4 — Discourse (special case)
Discourse does NOT support sortable tables by default.
Options:
1. Admin plugin (best if you control the forum)
discourse-data-explorer(not exactly for tables)- custom theme component with Tablesort
2. Theme component approach
If you can add theme JS:
api.decorateCookedElement((elem) => {
elem.querySelectorAll(“table”).forEach(t => new Tablesort(t));
});
This gives sorting across all posts automatically.