blackburn icon indicating copy to clipboard operation
blackburn copied to clipboard

reading time is not displayed

Open peranti opened this issue 5 years ago • 2 comments

Hi Yoshi,

Is there any change in the usage of readingTime parameter in config.toml for displaying the reading time of the posts?

    [params]
      # Shown in the home page
    
      dateFormat = "02 Jan 2006, 15:04"
      
      # Show estimated reading time for posts?
      readingTime = true

The above configuration is not working.

PS: The issue has already mentioned on StackOverflow.

peranti avatar Jun 02 '19 13:06 peranti

You need to add it to your template. In this theme I recommend to add it to layouts/partials/post_meta.html

Maybe you can try this:


  {{ if .Site.Params.ReadingTime }}
    <div>
      <i class="fas fa-clock"></i>
      {{ .ReadingTime }} min
    </div>
  {{ end }}

dwy6626 avatar Aug 15 '20 09:08 dwy6626

Thanks, @dwy6626 for the hack! It gives the following output.

post_ReadingTime It would be a good idea to align it next to the time of the post!

peranti avatar Aug 20 '20 19:08 peranti