diff --git a/package.json b/package.json index a1ef2e6..0b3df27 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "prepare": "npmluau", "dev": "astro dev", "start": "astro dev", - "build": "astro build && pagefind --site dist", + "build": "COMMIT_HASH=`git rev-parse --short HEAD` astro build && pagefind --site dist", "preview": "astro preview", "astro": "astro", "new-post": "lune run new-post", diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 98af7b8..895bd0a 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,12 +1,17 @@ --- import { profileConfig } from "../config"; + +const COMMIT_HASH = import.meta.env.COMMIT_HASH; +const COMMIT_HASH_URL = COMMIT_HASH + ? `https://github.com/CompeyDev/blog.devcomp.xyz/commit/${COMMIT_HASH}` + : null; ---