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.
これは非常に役立ちます。別のプラットフォームから多くのドキュメントをインポートしましたが、それらは他のドキュメントにリンクしています。ドキュメントページ(/docs?category=123&topic=456)またはトピックページ(/t/topic-title/456)へのリンクを置き換えることを余儀なくされているようです。
トピックタイトルを含む情報量の多いトピックリンクを使用できると便利ですが、ドキュメントビューで表示されたときにドキュメントにリダイレクトされるようになります。
さらに、トピックを別のカテゴリに移動した場合、/docs?categoryリンクは正しく機能しなくなります。驚くべきことに、実際にはドキュメントビューでトピックが表示されますが、古いカテゴリのフィルターが設定されます。
これ、まさに探していたものです!
現在、ドキュメントのトピックへのリンクを /docs?ascending=false&category=22&topic=1564 のように追加していますが、これは非常に手間がかかります。
ちょっとした質問ですが、皆さんはこの機能のプルリクエスト(PR)もサポートしていますか?もしそうなら、喜んでスポンサーになります。
こんにちは、ご提案とプルリクエストの申し出ありがとうございます。ドキュメントの改善について話し合っており、各ドキュメントに2つのURLではなく単一のURLを持たせるというアイデアも含まれています。それがこの問題を解決すると思いますが、現在のドキュメント機能の大幅なリファクタリングが必要になるでしょう。
簡単な回避策があります。組み込みのパーマリンク機能が機能するのではないでしょうか?管理インターフェイスで定義できます。少し手間はかかりますが、共有するのに非常にきれいなURLが得られます。
ありがとうございます、フィードバックに感謝します!
とりあえず、提案された回避策を使用してみます。しかし、/docsにトピックを増やすほど、長いURLリストを手動で管理しなければならない場合、事態はより複雑になる可能性があります。