# I want to remove the 3 dots added at the end of truncate

**URL:** <https://discourse.gohugo.io/t/i-want-to-remove-the-3-dots-added-at-the-end-of-truncate/44008>\
**Category:** support\
**Created:** [April 21, 2023, 10:01am UTC](https://discourse.gohugo.io/t/i-want-to-remove-the-3-dots-added-at-the-end-of-truncate/44008 "2023-04-21T10:01:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ardacarofficial](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ardacarofficial/32/21327_2.png) [@ardacarofficial](https://discourse.gohugo.io/u/ardacarofficial)\
**Post date:** [April 21, 2023, 10:01am UTC](https://discourse.gohugo.io/t/i-want-to-remove-the-3-dots-added-at-the-end-of-truncate/44008/1 "2023-04-21T10:01:18Z")

</div>

`{{ $summary := replace (.Summary | truncate 100) "..." "" }}`

When I use truncate 100, it adds 3 periods (…) at the end of the text after 100 characters.

I want to remove this, I tried with the code above but it doesn’t work.

Can you help me?

---

<div class="post-metadata">

**Author:** ![frjo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/frjo/32/18626_2.png) [@frjo](https://discourse.gohugo.io/u/frjo)\
**Post date:** [April 21, 2023, 10:37am UTC](https://discourse.gohugo.io/t/i-want-to-remove-the-3-dots-added-at-the-end-of-truncate/44008/2 "2023-04-21T10:37:10Z")

</div>

By default `truncate` add a ellipsis “…” not three separate dots “…”

You can set it to anything you like, including an empty string like this.

`{{ $summary := (.Summary | truncate 100 "") }}`

See the documentation at:

> **[truncate](https://gohugo.io/functions/truncate/)**
>
> Truncates a text to a max length without cutting words or leaving unclosed HTML tags.

---

<div class="post-metadata">

**Author:** ![ardacarofficial](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ardacarofficial/32/21327_2.png) [@ardacarofficial](https://discourse.gohugo.io/u/ardacarofficial)\
**Post date:** [April 21, 2023, 11:24am UTC](https://discourse.gohugo.io/t/i-want-to-remove-the-3-dots-added-at-the-end-of-truncate/44008/3 "2023-04-21T11:24:04Z")

</div>

`{{ $summary := (.Summary | truncate 100 "") }}`

It worked, thank you.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 23, 2023, 11:24am UTC](https://discourse.gohugo.io/t/i-want-to-remove-the-3-dots-added-at-the-end-of-truncate/44008/4 "2023-04-23T11:24:27Z")

</div>

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