mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-19 06:12:30 +00:00
fix indexing causing main thread freeze, various polish
This commit is contained in:
parent
e0ebee5aa9
commit
ab9da02c60
33 changed files with 255 additions and 141 deletions
quartz/components
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue