fix: modified time data of frontmatter didnt loaded. (#2165)

This commit is contained in:
FishCat233
2025-10-17 00:10:25 +08:00
committed by GitHub
parent b4805a1031
commit 52460f376f

View File

@@ -103,7 +103,6 @@ export const FrontMatter: QuartzTransformerPlugin<Partial<Options>> = (userOpts)
const created = coalesceAliases(data, ["created", "date"])
if (created) {
data.created = created
data.modified ||= created // if modified is not set, use created
}
const modified = coalesceAliases(data, [
@@ -113,6 +112,8 @@ export const FrontMatter: QuartzTransformerPlugin<Partial<Options>> = (userOpts)
"last-modified",
])
if (modified) data.modified = modified
data.modified ||= created // if modified is not set, use created
const published = coalesceAliases(data, ["published", "publishDate", "date"])
if (published) data.published = published