diff --git a/src/params/blogPage.ts b/src/params/blogPage.ts index 77f42c8..aec7801 100644 --- a/src/params/blogPage.ts +++ b/src/params/blogPage.ts @@ -1,5 +1,5 @@ /** @type {import('@sveltejs/kit').ParamMatcher} */ export function match(param: string) { - console.log('parma', param) + console.debug('parma', param) return !['tags', 'page'].some((keyword) => param.startsWith(keyword)) } diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index d9bc134..09c7c21 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -3,14 +3,12 @@ import type { LoadInput, LoadOutput } from '@sveltejs/kit/types/page' export async function load({ fetch, url }: LoadInput): Promise { - const blogPostsResponse = await fetch(`/blog`, { - headers: { accept: 'application/json' }, - }) + const blogPostsResponse = await fetch(`/blog/articles`) const blogPostsContent = await blogPostsResponse.json() return { props: { latestPosts: take(5, blogPostsContent.posts), - // TODO Check if not bugged + // TODO Check if not bugged FIXME segment: '', }, } diff --git a/src/routes/blog/[...params].svelte b/src/routes/blog/[...params].svelte index 806d017..699ddf2 100644 --- a/src/routes/blog/[...params].svelte +++ b/src/routes/blog/[...params].svelte @@ -1,3 +1,15 @@ + +