diff --git a/quartz/plugins/transformers/lastmod.ts b/quartz/plugins/transformers/lastmod.ts index 4d8805086..e8f53f644 100644 --- a/quartz/plugins/transformers/lastmod.ts +++ b/quartz/plugins/transformers/lastmod.ts @@ -63,12 +63,13 @@ export const CreatedModifiedDate: QuartzTransformerPlugin> = (u } try { - modified ||= await repo.getFileLatestModifiedDateAsync(fullFp!) + const status = await repo.getStatusAsync(); + modified ||= await repo.getFileLatestModifiedDateAsync(fullFp!); + console.log(chalk.green(`Git repository found at: ${status.tracked.includes(fullFp)}`)); } catch { console.log( chalk.yellow( - `\nWarning: ${file.data - .filePath!} isn't yet tracked by git, last modification date is not available for this file`, + `\nWarning: ${fullFp!} isn't yet tracked by git, last modification date is not available for this file`, ), ) }