Discourse Docs

:warning: This plugin is being retired in favour of the experimental Doc Categories plugin. We will still support Docs until the new plugin is no longer considered experimental.

:discourse2: Summary Discourse Docs provides the ability to find and filter knowledge base topics
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-docs
:open_book: Install Guide How to install plugins in Discourse

Features

The Discourse Docs plugin is a powerful tool that transforms your Discourse forum into a community-powered knowledge base. It provides a dedicated Docs section where users can create, update, and curate documentation. This plugin features a Docs button that allows easy access to this section. It’s a great way to leverage the collective knowledge of your community and provide a centralized resource for important information.

In essence, Docs allows for easier surfacing of knowledge-base style topics across a defined set of categories and/or tags.

Filter the list down by tags, search via the search bar, and click on topics to see the first post – all without leaving the context of the knowledge explorer.

Need to find a knowledge base topic from somewhere else in Discourse? Use the new search helper: in:kb.

Configuration

  1. Enable the plugin by turning on the docs enabled setting.

  2. Add categories and tags to the docs categories and docs tags settings.

  3. Find the Docs link in the navigation menu.

  1. Profit with easier access to knowledge!

Settings

Name Description
docs enabled Enable the Docs Plugin
docs categories A list of category slugs to include in docs
show tags by group Organize tags using Tag Groups. Create groups to categorize related tags.
docs tag groups The Tag Groups used to show tags by group
docs tags A list of tags to include in docs
docs add solved filter Adds a filter for solved topics – requires Discourse Solved to be installed and enabled
docs add to top menu Adds a link to the top menu to navigate to the Docs view
docs add search menu tip Adds the tip “in:docs” to the search menu random tips

Helpful Pairings

Renaming the /docs path

If you have access to your server you can change the path of your /docs link by adding a DISCOURSE_DOCS_PATH: environment variable to your app.yml:

For the change to take effect you can either ./launcher rebuild app or, as it’s an environment variable, you can ./launcher destroy app && ./launcher start app to minimise downtime. There’s a little more info on that here - Set Environmental Variables

You may also want to change the site display text as well to match. You can search for all instances of ‘docs’ from your /admin/customize/site_texts page, but the main ones would be:

  • js.docs.title
  • js.sidebar.docs_link_text

:discourse2: Hosted by us? Renaming the /docs path is only available on our Enterprise plan. Please contact us if you’d like to learn more.

Development History

The Docs plugin was a continuation from the Knowledge Explorer Theme Component.


:discourse2: Hosted by us? This plugin is available on all of our hosting plans. https://www.discourse.org/plugins/docs.html

Last edited by @hugh 2024-08-27T21:19:54Z

Last checked by @hugh 2024-08-27T04:23:36Z

Check documentPerform check on document:
95 лайков
Discourse Doc Categories
Using Posts as a Wiki?
Using Discourse as a internal Knowledge Base / Intranet
Is anyone working on a Discourse Wiki?
Documentation Library
Community glossary?
The Docs button on meta.discourse
Memberful opinions?
Subcategories and tag groups layout
[Paid] Parent/Child Tagging System + Docs Plugin Group Tagging
Discourse Category Lockdown
Filtering by multiple tags
Docs page in Discourse
Mirrored topic: same topic in two categories
Discourse Docs + Pavilion Layouts Plugin
FAQs, less thread-y more article-y
Topic List Previews (TLP)
Email list server?
Recommnded plugins for supporting a tech community run by a big enterprise?
Is it possible to display the thumbnails in Docs?
Customize docs plugin text link
Install discourse doc plugin from Git is failed
What is this component?
Advice on a support forum
Knowledge Base
Grow my community
Published topic with a link to itself in the forum?
Topic List Thumbnails don't play well with Docs
How-to use Discourse for managing a collaborative newsletter?
Is it possible to restrict certain “docs” to appear based on the user’s groups?
Pinning a post to the top of the topic
Knowledge Base
Discourse has slowly been solving a fatigue I didn't realize I had
Documentation in a Discussion forum
Discourse docs search error, 500 error
Discourse docs search error, 500 error
Discourse Docs Plugin – Topics Not Updating in Docs Page
Forum not working after update – what’s missing?
Knowledge Base
Making my discourse site look a certain way
Time tracking using Discourse?
Back button behavior on docs
Workspace Views
New documentation plugin in development
Is anyone here using their Discourse instance as their entire website?
Question Answer Plugin
How to make the recommanded topics collection
New homes for official and community documentation
Is it possible to show tags in place of subcategories?
Disable auto-scroll for certain topics?
Implementing KCS
How can I compare arbitrary revisions of a post?
How to create a page like the official Discourse docs?
Option to use "Docs view" when accessing Docs category from anywhere in Discourse
DiscoTOC - automatic table of contents
When a thread is too important to lose
About this Community and the Docs
Ability to Create Private Templates
Tips into building a community aside a variety of already existing tools
Sidebar for Subcategories
Published page not visible?
Nest subcategories under their parent categories in the sidebar
File/Document Repository?
Creating user guides for your community
Allow plugins (like docs) to add top-level links in sidebar (rather than hide them in More...)

Привет, сообщество Discourse,

При выполнении спецификации я получил ошибку ниже. Я не менял никаких файлов. Можно ли игнорировать эту ошибку?

➜  discourse git:(main) ✗ LOAD_PLUGINS=1 bundle exec rspec plugins/discourse-docs/spec

Randomized with seed 57815
...................................F

Failures:

  1) Discourse Docs | Index topic excerpts when the theme modifier serialize_topic_excerpts is true shows the excerpts
     Failure/Error: expect(page).to have_css(".topic-excerpt", text: topic_1.excerpt)
       expected to find css ".topic-excerpt" but there were no matches

     [Screenshot Image]: /xxxx/discourse/discourse/tmp/capybara/failures_r_spec_example_groups_discourse_docs_index_topic_excerpts_when_the_theme_modifier_serialize_topic_excerpts_is_true_shows_the_excerpts_460.png

     ~~~~~~~ JS LOGS ~~~~~~~
     ~~~~~ END JS LOGS ~~~~~

     # ./plugins/discourse-docs/spec/system/docs_index_spec.rb:52:in `block (4 levels) in <main>'
     # ./spec/rails_helper.rb:469:in `block (2 levels) in <top (required)>'

Finished in 13.16 seconds (files took 2.79 seconds to load)
36 examples, 1 failure

Failed examples:

rspec ./plugins/discourse-docs/spec/system/docs_index_spec.rb:50 # Discourse Docs | Index topic excerpts when the theme modifier serialize_topic_excerpts is true shows the excerpts

Randomized with seed 57815

Вам удалось решить это, @Hyan?

3 сообщения были перенесены в новую тему: Как создать оглавление для моей документации?

Привет, Сэм, не кажется ли тебе логичным с точки зрения SEO, чтобы rel=canonical тем указывал на оригинальную тему? Например, Dark/Light Mode Toggle - theme-component - Docs - Discourse MetaDark/Light Mode Toggle - theme-component - Discourse Meta? Мне интересно, не конкурируют ли две версии страницы друг с другом в алгоритмах Google.

1 лайк

Да, безусловно, нам стоит что-то сделать в этом направлении

1 лайк

Извини, @JammyDodger, у меня в последнее время не было возможности запустить Spec. Сейчас я занимаюсь не работой, связанной с Discourse Docs, а другими задачами. Но я дам тебе знать, как только появится возможность.

2 лайка

Можно ли изменить иконку рядом с разделом «Документация» в гамбургер-меню, заменив значок ссылки/цепочки на другой?

Этот плагин отлично подходит для того, чтобы разместить все категории документов в одном месте, избавив от необходимости дублировать их в списке категорий (спасибо плагину Discourse Category Hider). Однако мы обнаружили проблему:

В плагине Docs / на экране Docs невозможно редактировать существующие документы или создавать новые. Это означает, что вам приходится переходить в исходную категорию, чтобы найти тему/документ для редактирования… то есть документ должен быть доступен более чем в одном месте.

Существует ли возможность включить редактирование тем/документов (если пользователь принадлежит к правильной группе пользователей) непосредственно внутри плагина Docs?

Помогает ли ссылка «Посмотреть обсуждение по этой теме» внизу для перехода к теме и её редактирования?

1 лайк

Привет, у меня есть довольно раздражающая проблема, и я не понимаю, почему она возникает.

Когда я создаю документ, он попадает в раздел документов и работает как положено. Однако, если документ каким-либо образом редактируется, макет списка тем документов переключается обратно на стандартный макет темы Discourse при клике, и не отображается фактический макет документа.

Я заметил, что через несколько минут он снова возвращается к макету темы документа и выглядит так, как должно быть. Не могли бы вы подсказать, что может быть причиной этого?

Примечание: я также использую компонент темы «Миниатюры тем» и установил режим миниатюр документов в «список».

Нашёл проблему: похоже, что при использовании темы «topic-list-excerpts» (Topic List Excerpts) или компонента темы «Topic lists Thumbnails» (Topic List Thumbnails) ссылка href ведёт на страницу темы Discourse, а не на документацию KB?topic=xxx, из-за чего происходит перенаправление на темы Discourse.

Есть ли способ сохранить путь URL в документации на @sam, или стоит обратиться к @david?

Привет,

Наши пользователи недавно заметили небольшую проблему со стилями: когда ширина окна браузера меньше, содержимое каждого поста в документации выходит за пределы, как показано на следующем скриншоте:

Мне интересно, не лучше ли автоматически сворачивать боковую панель, если ширина окна недостаточна; однако даже после сворачивания боковой панели содержимое всё равно выходит за пределы.

Спасибо за замечательное дополнение. Но у меня один вопрос: есть ли возможность убрать ссылку из контекстного меню с «гамбургером»? Я добавил её вручную в секцию «всегда видна» (так как хотим использовать эту функцию для демонстрации длинного пользовательского контента, например, статей и т.д.), и теперь она отображается дважды:

Обе опции с более светлым фоном ведут на /docs

Думаю, вы можете скрыть это с помощью CSS здесь:

.sidebar-section-link-wrapper[data-list-item-name="docs"] {
    display: none;
}
1 лайк

Работает отлично! Большое спасибо!

Есть ли возможность добавить опцию для интеграции комментариев прямо на страницу документации, вместо перенаправления на пост для комментирования?

1 лайк

Я снова проверил ту же ссылку на устройстве с той же шириной области просмотра. Хотя до сворачивания боковой панели переполнение всё ещё присутствовало, я обнаружил, что после его сворачивания переполнения нет, и отображение выглядит нормально и эстетично.

Я удивлён, что в Документах порядок поиска по умолчанию — не «По релевантности», а «Дата активности».

Возможно ли искать по релевантности?

2 лайка

Сегодня я опубликовал несколько тем в категории «Документация», но они не отображаются на странице «Документация». Я отключил плагин документации и снова включил тему, но темы всё ещё не отображаются.
Спасибо!