# How can I keep post views on lists

**URL:** https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069
**Category:** Development
**Created:** [February 4, 2023, 6:58pm UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069 "2023-02-04T18:58:51Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ProjeDEV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/projedev/32/294219_2.png) [@ProjeDEV](https://meta.discourse.org/u/ProjeDEV)
#### Post date: [February 4, 2023, 6:58pm UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069/1 "2023-02-04T18:58:51Z")

</div>

![1-poem-excerpt](https://global.discourse-cdn.com/meta/original/4X/a/5/9/a595a0e8e2512ddda03d891ccf8f48e95848c5cf.png)

Hi,  
We have a poetry forum. In a single post, it looks normal like a poem, but the excerpt display view becomes a paragraph or combined text style on the homepage or category listings. The original post views are lost. I tried different things, different themes or the “topic list previews” plugin didn’t work. How can I show excerpts like poetry (e.g. first three lines or max lines with excerpt length) on homepage or specific category page.  
Thanks for support.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 4, 2023, 7:54pm UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069/2 "2023-02-04T19:54:39Z")

</div>

You might check the value of SiteSetting `traditional markdown linebreaks`. The description reads: “Use traditional linebreaks in Markdown, which require two trailing spaces for a linebreak.”

That is a bit confusing, but I think that you have this checked and you want it unchecked. Or maybe I’m confused.

---

<div class="post-metadata">

### Author: ![ProjeDEV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/projedev/32/294219_2.png) [@ProjeDEV](https://meta.discourse.org/u/ProjeDEV)
#### Post date: [February 4, 2023, 8:23pm UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069/3 "2023-02-04T20:23:08Z")

</div>

Thanks Jay, I tried but it didn’t work. I don’t know how but in the excerpt it combines all the sentences into one paragraph

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 4, 2023, 10:52pm UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069/4 "2023-02-04T22:52:41Z")

</div>

Hi Proje DEV! 🙂

Are you using [Topic List Excerpts](https://meta.discourse.org/t/topic-list-excerpts/151520)?

I believe you need a plugin if you want to override it to keep line breaks.

I think his is what would need to be overridden: [discourse/app/controllers/topics\_controller.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/app/controllers/topics_controller.rb#L276)

More specifically, this line:

> <https://github.com/discourse/discourse/blob/main/app/controllers/topics_controller.rb#L304>

I didn’t try, but this may be useful for this purpose: [Override existing Discourse methods in plugins](https://meta.discourse.org/t/override-existing-discourse-methods-in-plugins/83389)

I’d be happy to have a look, but I don’t have a development install right now (and I’m bad at coding, so hopefully someone more skilled will have a more suitable answer). 🙂

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [February 5, 2023, 12:47am UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069/5 "2023-02-05T00:47:48Z")

</div>

Hello, I think you can try it with `white-space: pre-line` it will keeps the topic line breaks in excerpt. 🙂

Add this to Common \> CSS

```scss
.topic-list {
  a.topic-excerpt {
    white-space: pre-line;
  }
}

```

 ![Screenshot 2023-02-05 at 1.43.46](https://global.discourse-cdn.com/meta/original/4X/8/b/7/8b79cbedc96d4eff2f1e8e4498eeb83629b0e611.png)

 ![Screenshot 2023-02-05 at 1.45.06](https://global.discourse-cdn.com/meta/original/4X/a/6/1/a6184ed52b8f1d2ee8ba912c47345382f557be04.png)

---

<div class="post-metadata">

### Author: ![ProjeDEV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/projedev/32/294219_2.png) [@ProjeDEV](https://meta.discourse.org/u/ProjeDEV)
#### Post date: [February 5, 2023, 12:58am UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069/6 "2023-02-05T00:58:12Z")

</div>

Thanks Don. It works 👍

---

<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: [March 7, 2023, 12:58am UTC](https://meta.discourse.org/t/how-can-i-keep-post-views-on-lists/254069/7 "2023-03-07T00:58:47Z")

</div>

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