A Discourse theme component that generates a table of contents for topics with one click
Go to file
Joe 58a1400f55
FEATURE: Automatically add TOC based on topic category / tags (#42)
This PR adds two settings.

One allows admins to select a list of categories that will automatically enable the TOC if the topic category matches.
The other does the same but with tags.

Note that the topic still needs to have the other requirements for TOC, such as having headings. Also, this will still only apply to the first post.

This PR also moves some setting descriptions to the appropriate place.

It also uses `pretender` for the tests instead of generating the fixture manually.
2022-07-26 01:23:19 +08:00
.github/workflows DEV: Update CI workflows (#41) 2022-06-17 22:23:35 +02:00
assets Change the icon for post-bottom button (#12) 2021-05-11 01:08:28 +08:00
common FIX: Compatibility with discourse-docs plugin (#37) 2022-05-09 14:09:59 -04:00
javascripts/discourse FEATURE: Automatically add TOC based on topic category / tags (#42) 2022-07-26 01:23:19 +08:00
locales FEATURE: Automatically add TOC based on topic category / tags (#42) 2022-07-26 01:23:19 +08:00
test/acceptance FEATURE: Automatically add TOC based on topic category / tags (#42) 2022-07-26 01:23:19 +08:00
.discourse-compatibility REFACTOR: General component overhaul (#19) 2022-01-18 09:18:21 -05:00
.eslintrc DEV: Update CI workflows (#39) 2022-06-17 18:20:09 +02:00
.gitignore DEV: Update CI workflows (#39) 2022-06-17 18:20:09 +02:00
.prettierrc DEV: Update CI workflows (#39) 2022-06-17 18:20:09 +02:00
.template-lintrc.js REFACTOR: General component overhaul (#19) 2022-01-18 09:18:21 -05:00
LICENSE Create LICENSE 2019-03-09 10:01:58 +08:00
README.md DEV: Update CI workflows (#39) 2022-06-17 18:20:09 +02:00
about.json DEV: Update CI workflows (#39) 2022-06-17 18:20:09 +02:00
package.json DEV: Update CI workflows (#39) 2022-06-17 18:20:09 +02:00
settings.yml FEATURE: Automatically add TOC based on topic category / tags (#42) 2022-07-26 01:23:19 +08:00
yarn.lock DEV: Update CI workflows (#39) 2022-06-17 18:20:09 +02:00

README.md

DiscoTOC

A Discourse theme component that generates a table of contents for topics with one click

https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143