toc
Jacky Zhao
2023-06-10 b8c011410d6bcd6837f4efd6a3948196a0f7aeea
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!))
            }
          }