From 07923196fb2625a1eebdb35dbb682d33d5ed9db5 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 7 Sep 2024 00:24:29 +0300 Subject: [PATCH] remark --- quartz/components/_Remark.tsx | 35 ++++++++++---------------------- quartz/components/renderPage.tsx | 1 - 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/quartz/components/_Remark.tsx b/quartz/components/_Remark.tsx index 9e7f93322..67a3d3e08 100644 --- a/quartz/components/_Remark.tsx +++ b/quartz/components/_Remark.tsx @@ -1,6 +1,4 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" -import { Root } from "mdast" -import { classNames } from "../util/lang" // @ts-ignore // import script from "./scripts/comments.inline" @@ -28,7 +26,7 @@ export default ((opts: Options) => { show_email_subscription: false, simple_view: false }; - `; + ` const embedScript = ` !function(e,n){ @@ -42,28 +40,17 @@ export default ((opts: Options) => { d.appendChild(r) } }(remark_config.components||["embed"], document); - `; + ` - return { - name: "TableOfContents", - markdownPlugins() { - return [ - () => { - return async (tree: Root, file) => { - // const display = file.data.frontmatter?.enableComments ?? true - // if (display) { - <> -
- - - - // } - } - } - ] - } + return async (tree: Root, file) => { + <> +
+
+ + + } - }; + } return Remark -}) satisfies QuartzComponentConstructor; +}) satisfies QuartzComponentConstructor diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index ec5124f4f..fb250364a 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -234,7 +234,6 @@ export function renderPage( -