diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0cf..db53e77f0 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,9 @@ /// + +interface ImportMetaEnv { + GITHUB_SHA: string; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +} diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 62ae93dc4..77ff5e5ea 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -32,6 +32,10 @@ const currentPageAbsoluteUrl = `https://roadmap.sh${permalink.replace( /\/$/, '' )}`; + +const commitUrl = `https://github.com/kamranahmedse/developer-roadmap/commit/${ + import.meta.env.GITHUB_SHA +}`; --- @@ -39,6 +43,7 @@ const currentPageAbsoluteUrl = `https://roadmap.sh${permalink.replace( + {title}