The Topic List Excerpts theme component allows users to enable excerpts for unpinned topics on Discourse. Discourse provides a summary of the component, including a preview and repository link.
The component has settings to control its behavior, including show excerpts mobile, show excerpts desktop, enabled categories, and enabled tags. Paracelsus and david discuss restricting the component by category, and david fixes an incompatibility issue with the Topic Thumbnails component.
Users, including downey, th21, and David_Ghost, report issues and request features, such as adjusting the word length of excerpts and showing the latest post instead of the first post. dsims suggests a plugin for showing the latest post excerpt. David_Ghost and eisammy report a problem with avatars on desktop, and Jagster notes that the excerpt toggle button is not visible on mobile.
WorldIsMine asks about blocking excerpts from showing on private messages, and Canapin responds that the component does not show excerpts on personal messages by default. Users can customize the component using CSS, as demonstrated by Arkshine.
The excerpts themselves are generated by Discourse Core, using the same logic as the excerpts of ‘pinned’ topics. If you have a query / suggestion about how the excerpts are built, please make a new Support topic.
Tip: you can keep line breaks in excerpts by adding this CSS to your theme:
I also take the chance to report that there is some kind of incompatibility with the Topic Thumbnails component, since the images appear twice for each topic in the topic list (topic list option on thumbnails component + topic excerpts component).
Love this component; thank you! Is there any way to adjust the word/character length of the excerpts displayed in topic lists? (Never mind, I found the topic excerpt maxlength site setting, adjusted it, and rebuilt HTML for the topic posts in question.)
Hi, this component gets rendered on the discourse docs plugin page and makes the excerpt clickable to the url of the discourse discussion not the doc url, is there anyway to avoid this from happening?