# Ability to custom define topic "preview text"

**URL:** https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455
**Category:** Support
**Created:** [1월 24, 2019, 8:20오후 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455 "2019-01-24T20:20:51Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![raykholo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raykholo/32/129848_2.png) [@raykholo](https://meta.discourse.org/u/raykholo)
#### Post date: [1월 24, 2019, 8:20오후 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/1 "2019-01-24T20:20:52Z")

</div>

Is it possible to change the preview snippet displayed for a topic?

I would like to be able to specify what is written here.

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/a/cac8ba5d9ded23a615e9c05d96343fd393afb31e.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 25, 2019, 4:35오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/2 "2019-01-25T04:35:24Z")

</div>

The only way to do that is to make sure the first text in the topic is what you want to be the preview.

---

<div class="post-metadata">

### Author: ![raykholo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raykholo/32/129848_2.png) [@raykholo](https://meta.discourse.org/u/raykholo)
#### Post date: [1월 25, 2019, 4:36오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/3 "2019-01-25T04:36:18Z")

</div>

Thanks Jeff.

Is it possible to specify a cutoff, such that in my example only the first sentence shows in the preview?

---

<div class="post-metadata">

### Author: ![1101010](https://avatars.discourse-cdn.com/v4/letter/1/6de8d8/32.png) [@1101010](https://meta.discourse.org/u/1101010)
#### Post date: [1월 25, 2019, 4:55오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/4 "2019-01-25T04:55:14Z")

</div>

But isn’t that the only place you see that text? It’s from the category description when you edit the category. So if you edit it down to what you want will that not work?

---

<div class="post-metadata">

### Author: ![raykholo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raykholo/32/129848_2.png) [@raykholo](https://meta.discourse.org/u/raykholo)
#### Post date: [1월 25, 2019, 4:57오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/5 "2019-01-25T04:57:06Z")

</div>

Not quite, I’m asking in regard to the preview shown for topics, not categories.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [1월 25, 2019, 4:57오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/6 "2019-01-25T04:57:29Z")

</div>

It sounds a lot like you’re looking for excerpts in the way that CMS such as WordPress offers.

What’s your use case?

---

<div class="post-metadata">

### Author: ![1101010](https://avatars.discourse-cdn.com/v4/letter/1/6de8d8/32.png) [@1101010](https://meta.discourse.org/u/1101010)
#### Post date: [1월 25, 2019, 4:57오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/7 "2019-01-25T04:57:40Z")

</div>

Oh gotcha. I hadn’t realised you COULD get a preview for topics. I might see if our users want that. Thanks and sorry for butting in!

---

<div class="post-metadata">

### Author: ![raykholo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raykholo/32/129848_2.png) [@raykholo](https://meta.discourse.org/u/raykholo)
#### Post date: [1월 25, 2019, 5:01오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/8 "2019-01-25T05:01:09Z")

</div>

> [@Stephen](#):
>
> What’s your use case?

I’m trying out hosting our documentation articles in one section of the forum so that it’s all in one place instead of having users bounce between the separate Docs and Forum sites. In this case I would like to be able to exercise a little more control to be able to clearly tell people what to do in that preview.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 25, 2019, 5:19오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/9 "2019-01-25T05:19:33Z")

</div>

Technically @sam built a version of this as an experiment a while back (where you could explicitly mark begin and end excerpts in the first post) but I am not sure it survived into current versions of Discourse.

---

<div class="post-metadata">

### Author: ![raykholo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raykholo/32/129848_2.png) [@raykholo](https://meta.discourse.org/u/raykholo)
#### Post date: [1월 25, 2019, 5:22오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/10 "2019-01-25T05:22:06Z")

</div>

No problem. I consider a product a success when the support questions revolve around small details and nitpicks instead of “it’s on fire!” or “why is it not working!?!?!?” - and I love Discourse.

Thanks Jeff.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [1월 25, 2019, 5:45오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/11 "2019-01-25T05:45:50Z")

</div>

Yeah we have 2 versions that work, a div with the class excerpt or a span with the class excerpt

`<div class="excerpt">`  
`<span class="excerpt">`

We use it in discourse code review, cause it makes oneboxes look way prettier

---

<div class="post-metadata">

### Author: ![raykholo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raykholo/32/129848_2.png) [@raykholo](https://meta.discourse.org/u/raykholo)
#### Post date: [1월 25, 2019, 5:53오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/12 "2019-01-25T05:53:05Z")

</div>

That certainly did the job.

Before:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/d/fd3de53287e6064e55a16e8665630f2785567f22.png)

After:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/8/d830c2114f011d855e7549612b18cfeff48e4068.png)

Editor:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/8/c8b41547048b79bdf166684565a2b7aa12c86884.png)

Thank you Sam!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2월 24, 2019, 6:00오전 UTC](https://meta.discourse.org/t/ability-to-custom-define-topic-preview-text/107455/13 "2019-02-24T06:00:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
