From 7bd3a6f06ac993cf1e505734337ea1b9222babd7 Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Tue, 15 Aug 2023 21:10:50 +0200 Subject: [PATCH] prefetch all links Signed-off-by: Max Schmidt --- astro/astro.config.mjs | 3 +++ astro/src/pages/index.astro | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/astro/astro.config.mjs b/astro/astro.config.mjs index 2f3e8ad..867516d 100644 --- a/astro/astro.config.mjs +++ b/astro/astro.config.mjs @@ -21,6 +21,9 @@ export default defineConfig({ image({ serviceEntryPoint: "@astrojs/image/sharp", }), + prefetch({ + selector: "a", + }), sitemap(), prefetch(), ], diff --git a/astro/src/pages/index.astro b/astro/src/pages/index.astro index fbb15f1..b7b2d6e 100644 --- a/astro/src/pages/index.astro +++ b/astro/src/pages/index.astro @@ -25,7 +25,7 @@ const posts = await getPosts(); { posts.length > 0 ? ( posts.map((post) => ( - +

{post.title}

{post.publishedDate && (