Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reading time is not displayed #89

Open
peranti opened this issue Jun 2, 2019 · 2 comments
Open

reading time is not displayed #89

peranti opened this issue Jun 2, 2019 · 2 comments

Comments

@peranti
Copy link

peranti commented Jun 2, 2019

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
Copy link
Contributor

dwy6626 commented Aug 15, 2020

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 added a commit to dwy6626/dw-favored-blackburn that referenced this issue Aug 15, 2020
@peranti
Copy link
Author

peranti commented Aug 20, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants