Remove artifacts and set language of markdown sites
All checks were successful
Deploy Stable Website / Build and Deploy (push) Successful in 46s
Deploy Dev Website / Build and Deploy (push) Successful in 42s

This commit is contained in:
2026-03-22 22:19:42 +01:00
parent 32a150c0ce
commit a88e284c1e
2 changed files with 2 additions and 22 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
*.md linguist-language=Astro
*.mdx linguist-language=Astro

View File

@@ -1,22 +0,0 @@
import { execSync } from "child_process";
import { statSync } from "fs";
export function remarkModifiedTime() {
return function (tree, file) {
const filepath = file.history[0];
try {
const result = execSync(`git log -1 --pretty="format:%cI" "${filepath}"`);
// If result is empty or undefined, fallback to fs stat
if (!result || !result.toString().trim()) {
throw new Error("No git history");
}
file.data.astro.frontmatter.lastModified = result.toString();
return;
} catch (e) {
// Ignore, fallback to fs stat
const result = statSync(filepath);
file.data.astro.frontmatter.lastModified = result.mtime.toISOString();
return;
}
};
}