yoshiharuyamashita / blackburn

A Hugo theme built using Yahoo's Pure CSS
MIT License
318 stars 169 forks source link

reading time is not displayed #89

Open peranti opened 5 years ago

peranti commented 5 years ago

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.

dwy6626 commented 4 years ago

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 }}
peranti commented 4 years ago

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!