Skip to content

minutes to read - #233

Merged
tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
rizzhal:news/rizzhal
Aug 17, 2026
Merged

minutes to read #233
tillkamppeter merged 1 commit into
OpenPrinting:masterfrom
rizzhal:news/rizzhal

Conversation

@rizzhal

@rizzhal rizzhal commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #225

This PR improves the syntactical error in the /app/news/page.tsx .

Problem -
readTime: typeof data.readTime === "string" ? data.readTime : "less than 1 minute read",
The project uses the readingTime package to calculate the time that is taken to read a particular article or news/ so if we are using readingTime then why we are passing readTime as a string. so even if you pass it like that , there will be no use , It will always show less than 1 minute read.

what I did -

import the readingTime package pass it to a function name readTimeText and calculate the time taken and render it , However if an article/news is taken less than 1 minute to read then show less than 1 minute read.

Hope this is what you are looking for.
Screenshot from 2026-08-17 15-27-30

@tillkamppeter

Copy link
Copy Markdown
Member

Hi, thanks for the fix, but your work is conflicting with the current state of the site. Probably you did it before I accepted some PRs yesterday. Could you resolve the conflicts/rebase to the current repo state? Thanks.

@tillkamppeter

Copy link
Copy Markdown
Member

According to the screenshot this is exactly what I need.

@rizzhal

rizzhal commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@tillkamppeter all conflicts are resolved

@tillkamppeter
tillkamppeter merged commit ac4f95f into OpenPrinting:master Aug 17, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

"News and Events" Page: "X Minutes to read" should be of the page itself, not of the abstract

2 participants