diff --git a/astro.config.mjs b/astro.config.mjs index 70a49a0..4840250 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,20 +1,4 @@ -import { execSync } from "node:child_process"; import { defineConfig } from "astro/config"; -// Get Git commit hash at build time -const getGitCommitHash = () => { - try { - return execSync("git rev-parse HEAD", { encoding: "utf-8" }).trim(); - } catch (error) { - return "unknown"; - } -}; - // https://astro.build/config -export default defineConfig({ - vite: { - define: { - __GIT_COMMIT_HASH__: JSON.stringify(getGitCommitHash()), - }, - }, -}); +export default defineConfig({}); diff --git a/src/components/Footer.astro b/src/components/Footer.astro new file mode 100644 index 0000000..d9135a8 --- /dev/null +++ b/src/components/Footer.astro @@ -0,0 +1,26 @@ +--- +import { GIT_COMMIT_HASH, REPO_URL } from "@/constants"; +--- + + + + diff --git a/src/components/Header.astro b/src/components/Header.astro new file mode 100644 index 0000000..0349171 --- /dev/null +++ b/src/components/Header.astro @@ -0,0 +1,132 @@ +--- +import { Image } from "astro:assets"; +import headshot from "@/images/headshot.jpg"; +--- +
+ + Bradley's Headshot + + + +
+ + + + diff --git a/src/constants.ts b/src/constants.ts index 7ba296a..334f866 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,2 +1,12 @@ +import { execSync } from "node:child_process"; + export const REPO_URL = "https://github.com/shenanigansd/shenanigansd.github.io"; + +export const GIT_COMMIT_HASH = (() => { + try { + return execSync("git rev-parse HEAD", { encoding: "utf-8" }).trim(); + } catch { + return "unknown"; + } +})(); diff --git a/src/env.d.ts b/src/env.d.ts deleted file mode 100644 index e16944b..0000000 --- a/src/env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// Build-time variables -declare const __GIT_COMMIT_HASH__: string; diff --git a/src/images/headshot.jpg b/src/images/headshot.jpg new file mode 100644 index 0000000..51f3680 Binary files /dev/null and b/src/images/headshot.jpg differ diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro new file mode 100644 index 0000000..526044b --- /dev/null +++ b/src/layouts/BaseLayout.astro @@ -0,0 +1,20 @@ +--- +import Footer from "../components/Footer.astro"; +import Header from "../components/Header.astro"; +import "../styles/global.css"; +const { pageTitle } = Astro.props; +--- + + + + + + + {pageTitle} + + +
+ +