Introducing the visual index editor for Discourse Doc Categories

AI-generated summary

saquetim announces the index editor, an upcoming feature for the Doc Categories plugin that allows admins to build sidebar indexes directly in the UI, eliminating the need for separate index topics. The new Doc index tab offers three modes: Editor (building the index in place with sections and links), Index topic (existing behavior), and Disabled. Existing categories using index topics remain unaffected.

Key features of the Editor mode include:

  • Link Management: Links can point to topics or custom URLs, support individual icons, and include warnings for duplicate destinations or section titles.
  • Auto-index: A special section that automatically aggregates topics not explicitly listed, with options to resync on save.
  • Bulk Actions: Users can see and add missing topics in bulk, delete multiple rows at once, and drag selections.
  • Accessibility & Organization: Sections and links are reorderable via drag-and-drop or keyboard shortcuts.

The feature is currently experimental and must be enabled via /admin/config/upcoming-changes under Doc categories index editor. It only impacts admin editing views for doc categories.

saquetim requests feedback on usability, missing features, and whether this approach replaces topic-based maintenance. martin notes that the initial PR has been merged behind this flag, with refinements expected over the next one to two weeks before reaching Alpha status.

Doc categories can now build their sidebar index directly in the admin UI. The index editor is an upcoming change for the Doc Categories plugin, and it removes the need to maintain a separate index topic.

Three ways to source an index

Editing a category now has a Doc index tab with a mode selector:

  • Editor builds the index in place, as sections holding links.
  • Index topic is the existing behaviour, where a topic’s headings and lists become the index.
  • Disabled turns the sidebar index off for that category.

Categories already pointing at an index topic keep working exactly as they do today.

Building an index

A section holds links, and a link points either at a topic or at any URL you type. Each link can carry its own icon, and the editor warns you when two links resolve to the same place or two sections share a title.

You are also shown when topics in the category do not appear in the index, and you can add these topics in bulk:

An Auto-index section fills itself from the category’s topics, so you can list the pages you care about by hand and let everything else collect in one place. It can resync on each save.

Sections and links reorder by dragging. Every drag handle is also an ordinary tab stop that opens a move menu, so the whole index can be rearranged from the keyboard. A batch mode handles multi-select, for deleting several rows at once or dragging a whole selection together.

Enable it on your site

The index editor is an experimental upcoming change. Enable Doc categories index editor at /admin/config/upcoming-changes. It affects doc categories only, and only what admins see while editing one.

We’d love your feedback

Tell us how it holds up against a real index: whether building one here beats maintaining a topic, what is missing before you would move a category over, and anything that feels rough.

10 Likes

The initial PR FEATURE: Add visual doc category index editor - Pull Request #87 - discourse/discourse-doc-categories - GitHub has just been merged behind an experimental upcoming change, the functionality will likely go through further refinements over the next week or two before we move it to Alpha.

1 Like