last modified is flaky but. whatever

This commit is contained in:
haetae 2025-08-15 21:47:41 -04:00
parent 6a9ae7237d
commit e56feaf1d0

View File

@ -3,11 +3,13 @@ import { statSync } from "fs";
export function modifiedTime() { export function modifiedTime() {
return function (_tree, file) { return function (_tree, file) {
const path = file.history[0]; const path = file.history[0];
try { const result = statSync(path);
const result = statSync(path); file.data.astro.frontmatter.lastModified = result.mtime;
file.data.astro.frontmatter.lastModified = result.mtime; // try {
} catch (error) { // const result = statSync(path);
return; // file.data.astro.frontmatter.lastModified = result.mtime;
} // } catch (error) {
// return;
// }
} }
} }