From c9f3d7a877d361bf3e2d7d79c4dde019f418432b Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@estrogen.zone>
Date: Wed, 14 Jan 2026 18:09:34 +0100
Subject: feat: prerendering page

---
 src/routes/blog/_posts/+page.svelte | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 src/routes/blog/_posts/+page.svelte

(limited to 'src/routes/blog/_posts/+page.svelte')

diff --git a/src/routes/blog/_posts/+page.svelte b/src/routes/blog/_posts/+page.svelte
new file mode 100644
index 0000000..2f7ca25
--- /dev/null
+++ b/src/routes/blog/_posts/+page.svelte
@@ -0,0 +1,32 @@
+<script lang="ts">
+  import { resolve } from '$app/paths';
+  import type { PageProps } from '../_/$types';
+  import { browser } from '$app/environment';
+  import { onMount, tick } from 'svelte';
+  import { goto } from '$app/navigation';
+
+  let { data }: PageProps = $props();
+  let posts = $derived(Object.entries(data.posts));
+  onMount(() => {
+    requestAnimationFrame(() => goto(resolve('/blog/')));
+    tick().then(() => goto(resolve('/blog/')));
+  });
+</script>
+
+{#if !browser}
+  {#each posts as a}
+    <!-- svelte-ignore a11y_consider_explicit_label -->
+    <a
+      href={resolve('/blog/[id=int]-[slug]', {
+        id: a[1].metadata.id.toString(),
+        slug: a[1].metadata.slug,
+      })}
+    ></a>
+    <!-- svelte-ignore a11y_consider_explicit_label -->
+    <a
+      href={resolve('/blog/[id=int]', {
+        id: a[1].metadata.id.toString(),
+      })}
+    ></a>
+  {/each}
+{/if}
-- 
cgit v1.2.3

