mirror of
https://github.com/thiloho/thiloho.github.io.git
synced 2025-11-22 02:11:35 +01:00
10 lines
303 B
JavaScript
10 lines
303 B
JavaScript
import { execSync } from "child_process";
|
|
|
|
export const remarkModifiedTime = () => {
|
|
return (tree, file) => {
|
|
const filepath = file.history[0];
|
|
const result = execSync(`git log -1 --pretty="format:%cI" "${filepath}"`);
|
|
file.data.astro.frontmatter.lastModified = result.toString();
|
|
};
|
|
};
|