diff options
| -rw-r--r-- | astro.config.mjs | 1 | ||||
| -rw-r--r-- | src/components/BlogPosts.astro | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/astro.config.mjs b/astro.config.mjs index 00bde21..2d50471 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -10,4 +10,5 @@ export default defineConfig({ plugins: [tailwindcss()], }, integrations: [react()], + prefetch: true, }) diff --git a/src/components/BlogPosts.astro b/src/components/BlogPosts.astro index 9101e38..5a66a89 100644 --- a/src/components/BlogPosts.astro +++ b/src/components/BlogPosts.astro @@ -21,7 +21,7 @@ const dateFormatter = new Intl.DateTimeFormat('en-GB', { <h1 class="text-3xl font-bold mb-8">Blog Posts</h1> <div class="space-y-4 max-h-96 overflow-y-auto"> {sortedPosts.map((post) => ( - <a href={`/posts/${post.id}`} class="block hover:opacity-80 transition-opacity"> + <a href={`/posts/${post.id}`} class="block hover:opacity-80 transition-opacity" data-astro-prefetch> <Card> <CardHeader> <h2 class="font-heading text-sm font-medium" transition:name={`post-title-${post.id}`}>{post.data.title}</h2> @@ -37,4 +37,4 @@ const dateFormatter = new Intl.DateTimeFormat('en-GB', { </a> ))} </div> -</div>
\ No newline at end of file +</div> |
