From 392253ff0826aa0a55bd4da32b47f4ce24de272a Mon Sep 17 00:00:00 2001 From: Corey Petty Date: Tue, 14 Jul 2026 09:47:42 -0400 Subject: [PATCH 1/6] trying out a way to implement inline commenting system into quartz --- docs-internal/inline-comments-design.md | 200 +++++ quartz.layout.ts | 14 + quartz/components/InlineComments.tsx | 58 ++ quartz/components/index.ts | 2 + .../scripts/inlineComments.inline.ts | 806 ++++++++++++++++++ quartz/components/styles/inlineComments.scss | 227 +++++ .../inline-comments-worker/.dev.vars.example | 4 + serverless/inline-comments-worker/README.md | 89 ++ .../inline-comments-worker/package.json | 16 + .../inline-comments-worker/src/index.ts | 282 ++++++ .../inline-comments-worker/tsconfig.json | 16 + .../inline-comments-worker/wrangler.toml | 13 + 12 files changed, 1727 insertions(+) create mode 100644 docs-internal/inline-comments-design.md create mode 100644 quartz/components/InlineComments.tsx create mode 100644 quartz/components/scripts/inlineComments.inline.ts create mode 100644 quartz/components/styles/inlineComments.scss create mode 100644 serverless/inline-comments-worker/.dev.vars.example create mode 100644 serverless/inline-comments-worker/README.md create mode 100644 serverless/inline-comments-worker/package.json create mode 100644 serverless/inline-comments-worker/src/index.ts create mode 100644 serverless/inline-comments-worker/tsconfig.json create mode 100644 serverless/inline-comments-worker/wrangler.toml diff --git a/docs-internal/inline-comments-design.md b/docs-internal/inline-comments-design.md new file mode 100644 index 0000000..1ebd30e --- /dev/null +++ b/docs-internal/inline-comments-design.md @@ -0,0 +1,200 @@ +# Inline Comments for Quartz — Design + +> Status: **draft / in progress** +> Owner: Corey Petty +> Companion code: `quartz/components/InlineComments.tsx`, `quartz/components/scripts/inlineComments.inline.ts`, `serverless/inline-comments-worker/` + +## Goal + +Add **inline, anchored comments** to this Quartz site — comments attached to a +specific text selection or paragraph (Medium margin-notes / Hypothes.is style), +not just one thread at the bottom of the page. It must be: + +- **Portable** — a single drop-in Quartz component + one small serverless function. +- **Backed by GitHub Discussions** — same store as the existing page-bottom + comments, so nothing is fragmented. +- **Authenticated with GitHub** — same identity model the site already uses. + +## Starting point (what already exists) + +`quartz.layout.ts` wires Quartz's built-in `Comments` component with +`provider: "giscus"`, pointed at GitHub Discussions on `logos-co/assembly` +(category _Announcements_). Giscus gives us **page-level** comments only: + +- Auth + posting happen entirely inside Giscus's hosted `