ナレッジベース

:warning: このテーマコンポーネントの機能は、Discourse Docs プラグインに置き換えられました

このテーマコンポーネントは、選択されたカテゴリに対してナレッジベース風のビューを可能にします。

:link: リポジトリリンク

:link: テーマクリエーターでプレビュー


設定で有効化されたカテゴリのナビゲーションピルに、KBボタンが追加されます。

このビューに切り替えると、ナレッジベースには最新のトピックリストの簡略化されたバージョンが表示されます。

サイドバーのタグをクリックすると、トピックリストが自動的にそのタグでフィルタリングされます。任意の数のタグを選択でき、フィルタリングされたトピックに付けられたタグのみがタグリストに表示されるため、大量のドキュメントを閲覧しやすくなります。

検索したい場合は、ボックスに用語を入力するだけです。検索結果も選択したタグに制限されます。

考慮事項

このコンポーネントが機能するには、以下のサイト設定が必須です:タグ付けの有効化 および タグによるフィルタ表示

このテーマコンポーネントには現在、モバイルビューは用意されていません。

とはいえ、より高度なバージョンの構築に取り組んでいます。準備が整い次第、Meta でお知らせします!

「いいね!」 27

This commit now adds a basic mobile view.

Note it’s not perfect, as if there are lots of tags, you do scroll over them. There are a couple of ideas I’m considering to fix that.

「いいね!」 9

We’ve been using Discourse as our KB for 4+ years and have around 350 Knowledge Base specific posts, so this very exciting!

I’m not sure if this is possible via a theme component, but is there anyway this “view” could be the default when someone opens a category? So that rather than going to: /c/knowledge-base that it would automatically load as /c/knowledge-base?kb=active?

We’ve enabled the KB theme component and really like it but we worry that people aren’t seeing the KB view because they’re using the /c/knowledge-base link they’ve previously bookmarked.

Thanks for your work on this.

「いいね!」 6

I’ll look into adding a setting for this! Thanks for the suggestion, and glad you’re finding this useful.

「いいね!」 6

This is now implemented as a theme setting. Subcategories are now supported, too!

「いいね!」 9

Just updated. Looks great, thank you!

「いいね!」 3

How do you apply this to a subcategory? Is there a special syntax?

Thank you so much for this! We have a category in our community that would be perfect for applying this component, but we are facing an issue: categories don’t show up in the “kb categories” drop down so we can’t choose the category to apply the component. Any advice?

You can just type in the category slug and create it. It is not extremely intuitive. I have not been able to figure out how to get sub categories but if your category is on the first level it is pretty easy.

「いいね!」 1

Ok, really not intuitive. I typed and “created” the category, and it worked. But it still does not appear as expected.

I did a fresh Discourse install to test, set up both components:

br%20a170a9ec422c

(D.I.Y. / diy is the category I want to enable KB for, and it has a specific top link created with Custom top navigation links component)

br%2086f9546a1534

But the D.I.Y. category appears with normal view:

br%2065b61e8af9f3

URL shows at the end: /c/diy?kb=active

「いいね!」 1

No special syntax - just enter the slug of the category (subcategory or not) in the kb categories theme setting, refresh your browser, and it should work.

This is a limitation of theme settings right now – you’ll have to type in the slug as @Sean_R suggested.

Did you get this sorted @TowerBR? Did you refresh after adding the category to the setting? Did you click the KB button? Sorry for the silly questions but trying to get to the bottom of it.

「いいね!」 1

It worked thanks :slight_smile:

I like it this way since I can name all of my KB subcategories the same and only need to add them once.

I do notice that if I go to the category by the dropdown that it does not automatically switch to the KB view.

All other ways to navigate appear to work but the sub-category drop-down does not.

「いいね!」 2

Do you have the default to kb view turned on? I just tested this on a site of mine and it did seem to work with subcategories.

「いいね!」 2

I do and it works most o the time just not if I use the sub-category drop-down to change categories from one to another category.

Odd - ok. If you can repro it consistently, let me know and I’ll take a look. I haven’t been able to get that behavior to fire using the subcategory dropdown.

「いいね!」 2

Yep, I had already done that, see the picture of the post above:

br%2086f9546a1534

I removed the “Custom top navigation links” component. It is now a completely “clean” installation:

br%20346e44618d61

Yes, and I cleaned the cache.

Yes. When I select the category by main drop down it already loads the category page with /c/diy?kb=active at the end of the URL. When I hover the KB button, it shows the “normal” URL without this “add-on”, but when I click on it nothing happens.

Are you running on the latest version of the theme component? Are you running on tests-passed or stable for your Discourse version?

「いいね!」 2

It happens every time. I can just click “KB” or refresh fixes it but not when I go to the category from the drop-down.

Yes:
br%20727aa12a3d7b

params:
   version: tests-passed
「いいね!」 3

This is awesome! Just installed it to take a look, and I can see it is already very useful.

This theme component does seem to conflict with Knowledge Base Plugin by @angus. I can confirm that the plugin has to be uninstalled prior to enabling this theme component, otherwise the below happens when you look at a knowledge base category. Note the weird horizontal line next to the menu and spinning circle.

I’d love to hear some more about the advanced version and what you have planned. Some feedback:

  • bug? when you select a tag from the left menu to filter by that tag, and then click to another category or latest etc… then when you next click on kb to return to the knowledge base you will find you are still filtering by that tag.
  • when you click on the tag under a title, it takes you to the tag page for that tag, not to a filtered kb view as it does when you click the tag on the left menu.
  • click on the tag category title on the left menu, and you are taken to the latest view for the category. I’d suggest this not link to anywhere. The category title also should probably not have # which is a distraction.
  • it would be handy to see the number of topics with each tag on the left menu
  • it would be handy to be able to sort kb topics alphabetically or even in custom order
「いいね!」 4