From 2f0eb54c2078fc3b9d1324c8126855e58e371c00 Mon Sep 17 00:00:00 2001 From: Aaron Pham Date: Sat, 3 Aug 2024 19:50:42 -0400 Subject: [PATCH] chore: address comments and test on branch Signed-off-by: Aaron Pham --- quartz.layout.ts | 16 +++++++++++++++- quartz/components/scripts/comments.inline.ts | 4 ---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/quartz.layout.ts b/quartz.layout.ts index 4a78256aa..e9ec591d7 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -5,7 +5,21 @@ import * as Component from "./quartz/components" export const sharedPageComponents: SharedLayout = { head: Component.Head(), header: [], - afterBody: [], + afterBody: [ + Component.Comments({ + provider: "giscus", + options: { + // from data-repo + repo: "jackyzha0/quartz", + // from data-repo-id + repoId: "MDEwOlJlcG9zaXRvcnkzODcyMTMyMDg", + // from data-category + category: "Announcements", + // from data-category-id + categoryId: "DIC_kwDOFxRnmM4B-Xg6", + }, + }), + ], footer: Component.Footer({ links: { GitHub: "https://github.com/jackyzha0/quartz", diff --git a/quartz/components/scripts/comments.inline.ts b/quartz/components/scripts/comments.inline.ts index 25ef1b79a..4ab29f087 100644 --- a/quartz/components/scripts/comments.inline.ts +++ b/quartz/components/scripts/comments.inline.ts @@ -1,7 +1,3 @@ -function boolToStringBool(b: boolean): string { - return b ? "1" : "0" -} - const changeTheme = (e: CustomEventMap["themechange"]) => { const theme = e.detail.theme const iframe = document.querySelector("iframe.giscus-frame") as HTMLIFrameElement