| | |
| | | } |
| | | |
| | | 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", |
| | |
| | | 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) |