From e82ba97a396e4e9d77486b48e6ee8b1dfd1c1b4c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 24 Jul 2023 07:07:58 +0000
Subject: [PATCH] actually add processed tag to frontmatter

---
 quartz/components/ReadingTime.tsx |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/quartz/components/ReadingTime.tsx b/quartz/components/ReadingTime.tsx
index 39110f9..f802c87 100644
--- a/quartz/components/ReadingTime.tsx
+++ b/quartz/components/ReadingTime.tsx
@@ -1,12 +1,15 @@
-import { QuartzComponentProps } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
 import readingTime from "reading-time"
 
-export default function ReadingTime({ fileData }: QuartzComponentProps) {
+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>
+    return (
+      <p class="reading-time">
+        {words} words, {timeTaken}
+      </p>
+    )
   } else {
     return null
   }
@@ -15,6 +18,8 @@
 ReadingTime.css = `
 .reading-time {
   margin-top: 0;
-  opacity: 0.5;
+  color: var(--gray);
 }
 `
+
+export default (() => ReadingTime) satisfies QuartzComponentConstructor

--
Gitblit v1.10.0