diff --git a/astro.config.mjs b/astro.config.mjs
index add434d..92e4a3c 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -1,8 +1,9 @@
import { defineConfig } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
-import { remarkModifiedTime } from "./remark-modified-time.mjs";
export default defineConfig({
+ site: "https://thiloho.github.io",
+
prefetch: {
prefetchAll: true,
},
@@ -15,6 +16,5 @@ export default defineConfig({
shikiConfig: {
theme: "github-dark",
},
- remarkPlugins: [remarkModifiedTime],
},
});
diff --git a/remark-modified-time.mjs b/remark-modified-time.mjs
deleted file mode 100644
index f0d8284..0000000
--- a/remark-modified-time.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-import { execSync } from "child_process";
-
-export const remarkModifiedTime = () => {
- return (file) => {
- const filepath = file.history[0];
- const result = execSync(`git log -1 --pretty="format:%cI" "${filepath}"`);
- file.data.astro.frontmatter.lastModified = result.toString();
- };
-}
\ No newline at end of file
diff --git a/src/components/Date.astro b/src/components/Date.astro
index 249ae87..0d19a4e 100644
--- a/src/components/Date.astro
+++ b/src/components/Date.astro
@@ -1,29 +1,17 @@
---
interface Props {
- date: Date | string;
+ date: Date;
}
const { date } = Astro.props;
-
-const isStringDate = typeof date === "string";
-const transformedDate = isStringDate ? new Date(date) : date;
-
-// Create the base options object
-const localeOptions = {
- year: "numeric",
- month: "long",
- day: "numeric",
-};
-
-// Conditionally add time options if it's a string date
-if (isStringDate) {
- Object.assign(localeOptions, {
- hour: "2-digit",
- minute: "2-digit"
- });
-}
---
-
\ No newline at end of file
+
diff --git a/src/components/Header.astro b/src/components/Header.astro
index 8ebc260..bba7292 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -22,7 +22,7 @@ const { title, pubDate, modDate } = Astro.props;
Published:
Last modified:{" "}
- {modDate ?