Jacky Zhao
2024-08-09 39eebca3cfa8adf504d08d54e6fc05912641b40f
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,7 +41,7 @@
            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)