diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..de7a7c2 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +PUBLIC_REPOURL=https://github.com/BuyMyMojo/aria.coffee/ \ No newline at end of file diff --git a/README.md b/README.md index 0e7ce26..e6a8e54 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Wowie what a gay little website for my gay little self +## Setup + +You must create a `.env` file with the contents of `.env.example` and set the URL of your repo for the commit footer. + +Example URL: `https://github.com/BuyMyMojo/aria.coffee/` - Notice the trailing `/`, this is required + ## Deploy steps (Pre-rendered website) On dev machine: diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 0da6d63..1e77a60 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -2,17 +2,20 @@ const buttonFormat = "gif"; import { Icon } from "astro-icon/components"; +import { execSync } from "node:child_process"; + +const commitURL = `${import.meta.env.PUBLIC_REPOURL}commit/${execSync(`git log -1 --pretty="format:%H"`)}`; ---