# Category description truncating

**URL:** https://meta.discourse.org/t/category-description-truncating/171584
**Category:** Support
**Created:** [November 28, 2020, 7:47pm UTC](https://meta.discourse.org/t/category-description-truncating/171584 "2020-11-28T19:47:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ziirahdane](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ziirahdane/32/201218_2.png) [@Ziirahdane](https://meta.discourse.org/u/Ziirahdane)
#### Post date: [November 28, 2020, 7:47pm UTC](https://meta.discourse.org/t/category-description-truncating/171584/1 "2020-11-28T19:47:25Z")

</div>

How can I increase the category description character amount or remove the truncation on the home page?

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [November 30, 2020, 5:28pm UTC](https://meta.discourse.org/t/category-description-truncating/171584/2 "2020-11-30T17:28:23Z")

</div>

The category description is based on the first paragraph in the “About” topic for that category. So, if you want to make the descriptions longer, add the information to the first paragraph.

---

<div class="post-metadata">

### Author: ![Ziirahdane](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ziirahdane/32/201218_2.png) [@Ziirahdane](https://meta.discourse.org/u/Ziirahdane)
#### Post date: [November 30, 2020, 5:53pm UTC](https://meta.discourse.org/t/category-description-truncating/171584/3 "2020-11-30T17:53:12Z")

</div>

Yes, I have a longer description inputted in the About topic, but I am specifically referencing how to remove the truncating as shown here:

 ![Screen Shot 2020-11-30 at 12.52.59 PM](https://global.discourse-cdn.com/meta/original/3X/7/7/775935f5292c51f574b87e595aadfe242b52ae85.jpeg)

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [November 30, 2020, 6:21pm UTC](https://meta.discourse.org/t/category-description-truncating/171584/4 "2020-11-30T18:21:50Z")

</div>

The description excerpt truncation happens on the server here.

> <https://github.com/discourse/discourse/blob/06084fb8be70a35968675da670c778cd34c1f551/app/models/category.rb#L316-L323>

It’s limited to 300 characters, and there’s no setting for that. However, you can use a theme component to bypass that and override the property and make it use the full description (the entire first paragraph).

Try adding something like this in the header section of a theme component.

```xml
<script type="text/discourse-plugin" version="0.8">
  const { on } = require("ember-addons/ember-computed-decorators");

  api.modifyClass("component:parent-category-row", {
    @on("init")
    updateDescription() {
      this.set(
        "attrs.category.description_excerpt",
        this.attrs.category.description
      );
    }
  });
</script>

```

---

<div class="post-metadata">

### Author: ![Ziirahdane](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ziirahdane/32/201218_2.png) [@Ziirahdane](https://meta.discourse.org/u/Ziirahdane)
#### Post date: [December 1, 2020, 8:22pm UTC](https://meta.discourse.org/t/category-description-truncating/171584/5 "2020-12-01T20:22:27Z")

</div>

Thank you, that is perfect for my needs!

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [December 2, 2020, 3:21pm UTC](https://meta.discourse.org/t/category-description-truncating/171584/6 "2020-12-02T15:21:52Z")

</div>


