From b8c011410d6bcd6837f4efd6a3948196a0f7aeea Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 10 Jun 2023 06:06:02 +0000
Subject: [PATCH] toc
---
quartz/plugins/transformers/lastmod.ts | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/quartz/plugins/transformers/lastmod.ts b/quartz/plugins/transformers/lastmod.ts
index cb57bb8..ef33afe 100644
--- a/quartz/plugins/transformers/lastmod.ts
+++ b/quartz/plugins/transformers/lastmod.ts
@@ -16,7 +16,7 @@
name = "CreatedModifiedDate"
opts: Options
- constructor(opts?: Options) {
+ constructor(opts?: Partial<Options>) {
super()
this.opts = {
...defaultOptions,
@@ -45,12 +45,11 @@
modified ||= file.data.frontmatter["last-modified"]
published ||= file.data.frontmatter.publishDate
} else if (source === "git") {
- console.log(file)
if (!repo) {
repo = new Repository(file.cwd)
}
- modified ||= new Date(await repo.getFileLatestModifiedDateAsync(fp))
+ modified ||= new Date(await repo.getFileLatestModifiedDateAsync(file.data.filePath!))
}
}
--
Gitblit v1.10.0