From fa69c2a5656254251b74dbd5545bef000f67af2f Mon Sep 17 00:00:00 2001
From: Ben Schlegel <31989404+benschlegel@users.noreply.github.com>
Date: Thu, 21 Sep 2023 17:35:11 +0000
Subject: [PATCH] fix(explorer): increase consistency, explicitly use font-family (#496)
---
quartz/plugins/transformers/frontmatter.ts | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts
index 3f55b9c..571aa04 100644
--- a/quartz/plugins/transformers/frontmatter.ts
+++ b/quartz/plugins/transformers/frontmatter.ts
@@ -2,14 +2,17 @@
import remarkFrontmatter from "remark-frontmatter"
import { QuartzTransformerPlugin } from "../types"
import yaml from "js-yaml"
+import toml from "toml"
import { slugTag } from "../../util/path"
export interface Options {
delims: string | string[]
+ language: "yaml" | "toml"
}
const defaultOptions: Options = {
delims: "---",
+ language: "yaml",
}
export const FrontMatter: QuartzTransformerPlugin<Partial<Options> | undefined> = (userOpts) => {
@@ -18,13 +21,14 @@
name: "FrontMatter",
markdownPlugins() {
return [
- remarkFrontmatter,
+ [remarkFrontmatter, ["yaml", "toml"]],
() => {
return (_, file) => {
const { data } = matter(file.value, {
...opts,
engines: {
yaml: (s) => yaml.load(s, { schema: yaml.JSON_SCHEMA }) as object,
+ toml: (s) => toml.parse(s) as object,
},
})
--
Gitblit v1.10.0