Go to file
Jordan Vidrine 06f6d00ba1
FEATURE: Use the same structure as core topic-list-item and add topic excerpts to docs index (#140)
* FEATURE: Optionally show topic excerpts in docs index

This commit adds a new docs_show_topic_excerpts site setting
which, when enabled and used in conjunction either with the
always_include_topic_excerpts site setting or the
serialize_topic_excerpts theme modifier.

For the theme modifier, this commit also fixes an issue
with the Docs::Query class. Since we were re-initializing
Guardian within the class (rather than using the guardian
passed down from the controller), we did not have the request
information needed to determine theme_id, which meant that
the theme modifier had no effect. We now pass down guardian
from the controller instead. In general guardian is almost
always better than a user object, since we can always just
call guardian.user.

Adds a simple system spec as well.

---

We now check both the serialize_topic_excerpts theme modifier
and the always_include_topic_excerpts site setting server-side
within Docs::Query, and use that on the client to determine
whether or not to show the excerpts for docs. This is because if
someone sets one of those values it's logical to think it will
apply everywhere there is a topic list.

Also include a system spec to test whether the theme modifier
works to show the excerpts.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2023-06-15 12:44:44 -05:00
.github/workflows DEV: Update CI workflows (#121) 2023-01-10 18:17:35 +00:00
app FEATURE: Use the same structure as core topic-list-item and add topic excerpts to docs index (#140) 2023-06-15 12:44:44 -05:00
assets FEATURE: Use the same structure as core topic-list-item and add topic excerpts to docs index (#140) 2023-06-15 12:44:44 -05:00
config FIX: English translation for the tag groups setting description (#142) 2023-06-13 12:59:44 -04:00
db/migrate FEATURE: Rename from Knowledge Explorer to Docs (#27) 2021-01-18 10:38:09 -06:00
lib FEATURE: Use the same structure as core topic-list-item and add topic excerpts to docs index (#140) 2023-06-15 12:44:44 -05:00
spec FEATURE: Use the same structure as core topic-list-item and add topic excerpts to docs index (#140) 2023-06-15 12:44:44 -05:00
test/javascripts FEATURE: add setting to show tags by group (#138) 2023-06-09 11:02:17 -04:00
.discourse-compatibility FEATURE: improve blank page syndrome (#79) 2022-01-28 20:10:53 +04:00
.eslintrc DEV: apply coding standards (#9) 2020-09-04 13:22:46 +02:00
.gitignore DEV: Update CI workflows, fix linting issues (#32) 2021-04-27 20:49:34 +02:00
.prettierrc DEV: Update CI workflows, fix linting issues (#32) 2021-04-27 20:49:34 +02:00
.rubocop.yml DEV: Introduce syntax_tree for ruby formatting (#118) 2022-12-29 13:31:34 +01:00
.streerc DEV: Introduce syntax_tree for ruby formatting (#118) 2022-12-29 13:31:34 +01:00
.template-lintrc.js DEV: apply coding standards (#9) 2020-09-04 13:22:46 +02:00
Gemfile DEV: Introduce syntax_tree for ruby formatting (#118) 2022-12-29 13:31:34 +01:00
Gemfile.lock DEV: Introduce syntax_tree for ruby formatting (#118) 2022-12-29 13:31:34 +01:00
LICENSE DEV: Update CI workflows, fix linting issues (#32) 2021-04-27 20:49:34 +02:00
README.md Update README.md (#60) 2021-10-04 12:36:30 -04:00
package.json DEV: Use angle bracket syntax (#135) 2023-05-26 16:16:08 -05:00
plugin.rb FIX: Incorrect plugin name in `requires_plugin` (#133) 2023-05-12 12:54:29 +02:00
translator.yml DEV: Add Crowdin support (#42) 2021-04-15 22:03:56 +02:00
yarn.lock DEV: Use angle bracket syntax (#135) 2023-05-26 16:16:08 -05:00

README.md

Discourse Docs Plugin

Find and filter knowledge base topics.

For more information, please see: https://meta.discourse.org/t/discourse-docs-documentation-management-plugin/130172/