Skip to content

Commit 1310d92

Browse files
authored
Update navbar.ts
1 parent b2a2194 commit 1310d92

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

docs/.vuepress/navbar.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
11
import { defineNavbarConfig } from 'vuepress-theme-plume';
22

33
async function fetchNavbarConfig() {
4-
const response = await fetch('https://api.github.com/orgs/SpechtLabs/repos', {
5-
headers: {
6-
'Accept': 'application/vnd.github+json',
7-
'X-GitHub-Api-Version': '2022-11-28',
8-
}
9-
});
10-
11-
if (!response.ok) {
12-
throw new Error(`GitHub API error: ${response.statusText}`);
13-
}
14-
15-
const repos = await response.json();
16-
17-
const projectItems = repos
18-
.filter(repo =>
19-
repo.homepage &&
20-
repo.name.toLowerCase() !== 'spechtlabs.github.io'
21-
)
22-
.map(repo => ({
23-
text: repo.name,
24-
link: repo.homepage
25-
}));
26-
274
return defineNavbarConfig([
285
{ text: 'Home', link: '/' },
296
{ text: 'Blog', link: '/blog/', activeMatch: '/blog/', },
307
{ text: 'About Me', link: '/about/' },
31-
{
32-
text: 'Projects',
33-
items: projectItems
34-
}
35-
// { text: 'Blog', link: '/blog/' },
368
]);
379
}
3810

0 commit comments

Comments
 (0)