From 8ce87778a62cacd791aabc003d5fab7d70ed3d37 Mon Sep 17 00:00:00 2001 From: bfahrenfort Date: Sat, 2 Sep 2023 13:35:08 -0500 Subject: [PATCH] Quartz sync: Sep 2, 2023, 1:35 PM --- content/Essays/template.md | 18 ++++++++ oquonie_save.bin | Bin 16 -> 0 bytes quartz.config.ts | 11 ++++- quartz.layout.ts | 1 + quartz/components/Footer.tsx | 12 +++++- quartz/plugins/transformers/index.ts | 1 + quartz/plugins/transformers/remark42.ts | 54 ++++++++++++++++++++++++ quartz/plugins/types.ts | 5 ++- 8 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 content/Essays/template.md delete mode 100644 oquonie_save.bin create mode 100644 quartz/plugins/transformers/remark42.ts diff --git a/content/Essays/template.md b/content/Essays/template.md new file mode 100644 index 000000000..8473f82bd --- /dev/null +++ b/content/Essays/template.md @@ -0,0 +1,18 @@ +--- +draft: true +title: An Essay +tags: + - essay + - incomplete +--- + + + +This is tan essay. + +Comment with [[Projects/quartz-comments|Remark42]] down below! +
diff --git a/oquonie_save.bin b/oquonie_save.bin deleted file mode 100644 index 3020c2f0fa2206544911f9fc6641195e267778b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16 XcmZQ(XJ$~@sH&;@Qt76+fIK4r8e9W` diff --git a/quartz.config.ts b/quartz.config.ts index 816c04c4b..420c7187b 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -1,10 +1,18 @@ import { QuartzConfig } from "./quartz/cfg" import * as Plugin from "./quartz/plugins" +import { OptionType } from "./quartz/plugins/types" + +var remark = Plugin.Remark42({ host: "https://be-far.com/comments", site_id: "remark", theme: "dark", no_footer: true }) +declare global { + var remark_config: OptionType +} + +globalThis.remark_config = remark.options const config: QuartzConfig = { configuration: { pageTitle: "🌱 be-far", - enableSPA: true, + enableSPA: false, enablePopovers: true, analytics: null, baseUrl: "be-far.com", @@ -52,6 +60,7 @@ const config: QuartzConfig = { Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }), Plugin.Latex({ renderEngine: "katex" }), Plugin.Description(), + remark ], filters: [Plugin.RemoveDrafts()], emitters: [ diff --git a/quartz.layout.ts b/quartz.layout.ts index 31ebe6601..663dfdedf 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -10,6 +10,7 @@ export const sharedPageComponents: SharedLayout = { "Source code": "https://github.com/bfahrenfort/quartz", "RSS": "https://be-far.com/index.xml" }, + //remark_config: config.plugins.transformers.find((e) => {e.name === "Remark42"})?.options }), } diff --git a/quartz/components/Footer.tsx b/quartz/components/Footer.tsx index f92ade668..00656d331 100644 --- a/quartz/components/Footer.tsx +++ b/quartz/components/Footer.tsx @@ -1,17 +1,25 @@ import { QuartzComponentConstructor } from "./types" +import { OptionType } from "../plugins/types" import style from "./styles/footer.scss" import { version } from "../../package.json" -interface Options { +interface Optionss { links: Record } -export default ((opts?: Options) => { +console.log(globalThis.remark_config) + +export default ((opts?: Optionss) => { function Footer() { const year = new Date().getFullYear() const links = opts?.links ?? [] return (