# ReadingTime Define

**URL:** <https://discourse.gohugo.io/t/readingtime-define/13036>\
**Category:** support\
**Created:** [July 19, 2018, 2:44pm UTC](https://discourse.gohugo.io/t/readingtime-define/13036 "2018-07-19T14:44:47Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Leo\_Merkel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/leo_merkel/32/3321_2.png) [@Leo\_Merkel](https://discourse.gohugo.io/u/Leo_Merkel)\
**Post date:** [July 19, 2018, 4:04pm UTC](https://discourse.gohugo.io/t/readingtime-define/13036/4 "2018-07-19T16:04:37Z")

</div>

Here’s the partial I use:

```auto
{{ if gt .ReadingTime 1 }}
    {{ .Scratch.Set "readingTime" "minutes" }}
{{ else }}
    {{ .Scratch.Set "readingTime" "minute" }}
{{ end }}

<p>Reading time: {{ .ReadingTime }} {{ .Scratch.Get "readingTime" }}</p>

{{/*<!-- NOTE: Alternative writing:
    {{ $readTime := cond (gt .ReadingTime 1) "minutes" "minute" }}
    <p>Reading time: {{ .ReadingTime }} {{ $readTime }}.</p>
-->*/}}

```

Hope this helps.

---

_[View the full topic](https://discourse.gohugo.io/t/readingtime-define/13036)._
