From fe353d946bd90d38647a9dceff7ea85d425e8a83 Mon Sep 17 00:00:00 2001
From: kabirgh <15871468+kabirgh@users.noreply.github.com>
Date: Fri, 09 Feb 2024 15:07:32 +0000
Subject: [PATCH] feat(experimental): partial rebuilds (#716)
---
quartz/plugins/transformers/frontmatter.ts | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts
index eae359e..9371df8 100644
--- a/quartz/plugins/transformers/frontmatter.ts
+++ b/quartz/plugins/transformers/frontmatter.ts
@@ -5,6 +5,7 @@
import toml from "toml"
import { slugTag } from "../../util/path"
import { QuartzPluginData } from "../vfile"
+import { i18n } from "../../i18n"
export interface Options {
delims: string | string[]
@@ -43,7 +44,7 @@
const opts = { ...defaultOptions, ...userOpts }
return {
name: "FrontMatter",
- markdownPlugins() {
+ markdownPlugins({ cfg }) {
return [
[remarkFrontmatter, ["yaml", "toml"]],
() => {
@@ -59,7 +60,7 @@
if (data.title) {
data.title = data.title.toString()
} else if (data.title === null || data.title === undefined) {
- data.title = file.stem ?? "Untitled"
+ data.title = file.stem ?? i18n(cfg.configuration.locale).propertyDefaults.title
}
const tags = coerceToArray(coalesceAliases(data, ["tags", "tag"]))
--
Gitblit v1.10.0