Links should remain in Docs

We use Discourse to communicate in our team. We have a special category for our internal handbook, where all posts are wikis.
The Docs plugin is perfect to search and view our internal documentation, except for the fact that when one docs page links to another page, it returns back to the normal forum view.
Is there a way to automagically rewrite the links so that when one post links to another post, this stays in the Knowledge Explorer?


It would be possible to do this, but it would be a relatively hacky implementation. We’d have to append a query param to each link click, then redirect to the Docs view via patching into the TopicController. However, not all internal links will point to a topic that’s in Docs, so there’s that to account for, too.

I’d like to see more requests for this before we attempt to implement it.


I’m in support of this, and would furthermore like a way to have “Docs” topics always default to the “Docs” view first, no matter where the link is coming from. Otherwise it is a somewhat inconsistent experience and can end up feeling a bit “hacky” in itself at times.


This would be very useful. I just imported many docs from a different platform that link to other docs, and seem to be forced to either replace them with links to the docs page (/docs?category=123&topic=456) or the topic page (/t/topic-title/456).

It would be nice to be able to use the informative topic link (contains the topic title) but have it redirect to the Doc when viewed in Docs view.

Moreover, if we move the topic to another category, the /docs?category link no longer works properly. Surprisingly, it actually does present the topic in Docs view, but it sets the filter for the old category.


Digging out this one! Exactly what we are looking for!

Currently we are adding links to Docs topics like this: /docs?ascending=false&category=22&topic=1564 which is a huge hassle.


Just a quick bump and question if you guys also support PRs for this? Would be happy to sponsor such feature.

1 Like

Hello and thanks for the suggestion and PR offer. We’ve been talking about improving Docs, including the idea of each document having a single URL instead of 2 URLs. I think that would solve this problem but would requite quite a refactoring of the Docs feaure as it exists now.


Oh there is a quick workaround. I think the built in permalink feature should work? You can define them in your admin interface. A bit extra work but gives you very clean URLs to share.

thx guys, I appreciate the feedback!

We will try and use the suggested workaroud for now. But the more we fill our /docs with topics, the more complicated things might become if we have to manually manage a long list of URLs.