Fix Date component for string from remark

This commit is contained in:
thiloho
2025-04-26 09:43:01 +02:00
parent 69be9d8ab7
commit f8e71fc3b6
3 changed files with 26 additions and 12 deletions

View File

@@ -1,9 +1,9 @@
import { execSync } from "child_process";
export const remarkModifiedTime = () => {
return (tree, file) => {
return (file) => {
const filepath = file.history[0];
const result = execSync(`git log -1 --pretty="format:%cI" "${filepath}"`);
file.data.astro.frontmatter.lastModified = result.toString();
};
};
}