mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-06-22 08:44:36 +00:00
fix indexing causing main thread freeze, various polish
This commit is contained in:
@ -3,8 +3,7 @@ import readingTime from "reading-time"
|
||||
|
||||
function ReadingTime({ fileData }: QuartzComponentProps) {
|
||||
const text = fileData.text
|
||||
const isHomePage = fileData.slug === "index"
|
||||
if (text && !isHomePage) {
|
||||
if (text) {
|
||||
const { text: timeTaken, words } = readingTime(text)
|
||||
return <p class="reading-time">{words} words, {timeTaken}</p>
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user