fixed lastmod.ts
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-09-07 11:46:48 +03:00
parent b4654a24e2
commit 296787d242
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C

View File

@ -58,8 +58,16 @@ export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options>> = (u
// Get a reference to the main git repo.
// It's either the same as the workdir,
// or 1+ level higher in case of a submodule/subtree setup
repo = await Repository.discover(file.cwd, { search: true });
console.log(chalk.green(`Git repository found at: ${repo.path()}`));
console.log(`Current working directory: ${file.cwd}`);
console.log(`Attempting to discover Git repository from: ${path.join(file.cwd, 'content')}`);
try {
repo = await Repository.discover(path.join(file.cwd, 'content'), { search: true });
console.log(chalk.green(`Git repository found at: ${repo.path()}`));
} catch (error) {
console.log(chalk.red(`Error discovering Git repository: ${error.message}`));
repo = undefined;
}
}
try {