summaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/components/Footer/AvatarList.astro12
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/src/components/Footer/AvatarList.astro b/docs/src/components/Footer/AvatarList.astro
index 589e296b9..053b015fa 100644
--- a/docs/src/components/Footer/AvatarList.astro
+++ b/docs/src/components/Footer/AvatarList.astro
@@ -1,8 +1,14 @@
---
// fetch all commits for just this page's path
-const path = "docs/" + Astro.props.path;
-const url = `https://api.github.com/repos/snowpackjs/astro/commits?path=${path}`;
-const commitsURL = `https://github.com/snowpackjs/astro/commits/main/${path}`;
+
+export interface Props {
+ path: string;
+}
+
+const { path } = Astro.props as Props;
+const commitPath = 'docs/' + path;
+const url = `https://api.github.com/repos/snowpackjs/astro/commits?path=${commitPath}`;
+const commitsURL = `https://github.com/snowpackjs/astro/commits/main/${commitPath}`;
async function getCommits(url) {
try {