From 22f1b7a47648756176e146ff6b77fa1f6ab956e1 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 7 Sep 2024 12:00:56 +0300 Subject: [PATCH] fixed lastmod.ts --- quartz/plugins/transformers/lastmod.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/quartz/plugins/transformers/lastmod.ts b/quartz/plugins/transformers/lastmod.ts index 591e454ba..ce894296d 100644 --- a/quartz/plugins/transformers/lastmod.ts +++ b/quartz/plugins/transformers/lastmod.ts @@ -71,14 +71,9 @@ export const CreatedModifiedDate: QuartzTransformerPlugin> = (u } try { - modified ||= await repo.getFileLatestModifiedDateAsync(file.data.filePath!) - } catch { - console.log( - chalk.yellow( - `\nWarning: ${file.data - .filePath!} isn't yet tracked by git, last modification date is not available for this file`, - ), - ) + modified ||= await repo.getFileLatestModifiedDateAsync(file.data.filePath!); + } catch (error) { + console.log(chalk.red(`Error retrieving latest modified date for ${file.data.filePath}: ${error.message}`)); } } }