custom blog ejs template with N minute read function? #1797
-
Hi everyone! I'm making my own custom blog page layout and I want to add a time estimate to read the article to my thumbnail. Here's what my YAML looks like:
And here's a div soup of
but I'd like to add to the thumbnail an "N minute read" and i was kind of lazily hoping there's something that exists already that I can piggy back off of? Is there some metadata object I have access to here maybe? For instance I didn't specify
I was thinking I can maybe use a function like this but im not sure how to grab the file if i need to do this from scratch. Anyone have any ideas?
Was also thinking this could be a cool feature to just add to posts/blog template if this is of interest to others! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I believe that you could use |
Beta Was this translation helpful? Give feedback.
I believe that you could use
item['reading-time']
to reference the reading time... im afk but give that a try!