aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/docs/src/components/Footer/AvatarList.astro6
-rw-r--r--examples/docs/src/env.d.ts8
2 files changed, 10 insertions, 4 deletions
diff --git a/examples/docs/src/components/Footer/AvatarList.astro b/examples/docs/src/components/Footer/AvatarList.astro
index b75589f5a..03b1e5bd7 100644
--- a/examples/docs/src/components/Footer/AvatarList.astro
+++ b/examples/docs/src/components/Footer/AvatarList.astro
@@ -17,11 +17,9 @@ type Commit = {
async function getCommits(url: string) {
try {
- const token = import.meta.env.SNOWPACK_PUBLIC_GITHUB_TOKEN ?? 'hello';
+ const token = import.meta.env.GITHUB_TOKEN ?? 'hello';
if (!token) {
- throw new Error(
- 'Cannot find "SNOWPACK_PUBLIC_GITHUB_TOKEN" used for escaping rate-limiting.'
- );
+ throw new Error('Cannot find "GITHUB_TOKEN" used for escaping rate-limiting.');
}
const auth = `Basic ${Buffer.from(token, 'binary').toString('base64')}`;
diff --git a/examples/docs/src/env.d.ts b/examples/docs/src/env.d.ts
index f964fe0cf..8e48612f5 100644
--- a/examples/docs/src/env.d.ts
+++ b/examples/docs/src/env.d.ts
@@ -1 +1,9 @@
/// <reference types="astro/client" />
+
+interface ImportMetaEnv {
+ readonly GITHUB_TOKEN: string | undefined;
+}
+
+interface ImportMeta {
+ readonly env: ImportMetaEnv;
+}