diff --git a/src/routes/blog/+page.server.ts b/src/routes/blog/+page.server.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/blog/[year]/[slug]/+page.server.ts b/src/routes/blog/[...slug]/+page.server.ts similarity index 67% rename from src/routes/blog/[year]/[slug]/+page.server.ts rename to src/routes/blog/[...slug]/+page.server.ts index 7e9ad5b..ff331c9 100644 --- a/src/routes/blog/[year]/[slug]/+page.server.ts +++ b/src/routes/blog/[...slug]/+page.server.ts @@ -1,5 +1,5 @@ import type { EntryGenerator } from './$types'; export const entries: EntryGenerator = () => { - return [{ year: '2024', slug: 'test-post' }]; + return [{ slug: '2024/test-post' }]; }; diff --git a/src/routes/blog/[year]/[slug]/+page.svelte b/src/routes/blog/[...slug]/+page.svelte similarity index 100% rename from src/routes/blog/[year]/[slug]/+page.svelte rename to src/routes/blog/[...slug]/+page.svelte diff --git a/src/routes/blog/[year]/[slug]/+page.ts b/src/routes/blog/[...slug]/+page.ts similarity index 93% rename from src/routes/blog/[year]/[slug]/+page.ts rename to src/routes/blog/[...slug]/+page.ts index edd45bc..977c0e5 100644 --- a/src/routes/blog/[year]/[slug]/+page.ts +++ b/src/routes/blog/[...slug]/+page.ts @@ -1,4 +1,4 @@ -import type { PageLoad } from './$types.js'; +import type { PageLoad } from '../[year]/[slug]/$types.js'; import { unified } from 'unified'; import rehypeKatex from 'rehype-katex'; import rehypeStringify from 'rehype-stringify';