Skip to content

Commit 4c82766

Browse files
authored
Fix fetch URL (#800)
1 parent 2f6c559 commit 4c82766

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

website/src/lib/articles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type GitHubContent = {
2727

2828
async function fetchContents(path: string): Promise<GitHubContent[]> {
2929
try {
30-
const response = await fetch(`${GITHUB_BLOG_REPO}/contents/${path}`, { cache: 'force-cache' })
30+
const response = await fetch(`${GITHUB_BLOG_REPO}/contents${path}`, { cache: 'force-cache' })
3131

3232
if (!response.ok) {
3333
throw new Error('Failed to fetch releases')
@@ -64,7 +64,7 @@ function generateBlogLink(date: string, title: string) {
6464
}
6565

6666
export async function getArticlesData(): Promise<ProcessedFile[]> {
67-
const releases = await fetchContents('content/posts/releases')
67+
const releases = await fetchContents('/website/blog/releases')
6868

6969
const processedReleases = []
7070

website/src/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const GITHUB_MAIN_REPO = 'https://api.github.com/repos/spiceai/spiceai'
22

3-
export const GITHUB_BLOG_REPO = 'https://api.github.com/repos/spiceai/blog'
3+
export const GITHUB_BLOG_REPO = 'https://api.github.com/repos/spiceai/docs'

0 commit comments

Comments
 (0)