From e47c29d2fd4eae06c511c914e2a5fcb057b44d7b Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 19 Aug 2024 21:14:29 +0000
Subject: [PATCH] chore(deps): bump rehype-katex from 7.0.0 to 7.0.1 (#1356)
---
quartz/plugins/transformers/lastmod.ts | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/quartz/plugins/transformers/lastmod.ts b/quartz/plugins/transformers/lastmod.ts
index 6e12616..fe8c01b 100644
--- a/quartz/plugins/transformers/lastmod.ts
+++ b/quartz/plugins/transformers/lastmod.ts
@@ -27,9 +27,7 @@
}
type MaybeDate = undefined | string | number
-export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options> | undefined> = (
- userOpts,
-) => {
+export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options>> = (userOpts) => {
const opts = { ...defaultOptions, ...userOpts }
return {
name: "CreatedModifiedDate",
@@ -43,18 +41,18 @@
let published: MaybeDate = undefined
const fp = file.data.filePath!
- const fullFp = path.posix.join(file.cwd, fp)
+ const fullFp = path.isAbsolute(fp) ? fp : path.posix.join(file.cwd, fp)
for (const source of opts.priority) {
if (source === "filesystem") {
const st = await fs.promises.stat(fullFp)
created ||= st.birthtimeMs
modified ||= st.mtimeMs
} else if (source === "frontmatter" && file.data.frontmatter) {
- created ||= file.data.frontmatter.date
- modified ||= file.data.frontmatter.lastmod
- modified ||= file.data.frontmatter.updated
- modified ||= file.data.frontmatter["last-modified"]
- published ||= file.data.frontmatter.publishDate
+ created ||= file.data.frontmatter.date as MaybeDate
+ modified ||= file.data.frontmatter.lastmod as MaybeDate
+ modified ||= file.data.frontmatter.updated as MaybeDate
+ modified ||= file.data.frontmatter["last-modified"] as MaybeDate
+ published ||= file.data.frontmatter.publishDate as MaybeDate
} else if (source === "git") {
if (!repo) {
// Get a reference to the main git repo.
--
Gitblit v1.10.0