From 37047c619c11e76f4091acdcedb4bff092bc093c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=89=E9=87=8E=E6=95=AC=E5=A4=AA=E9=83=8E?= Date: Fri, 15 Mar 2024 16:07:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20pre-render=E3=82=92=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astro.config.mjs | 4 ++++ src/components/molecules/PostCard.astro | 2 +- src/pages/introduction.astro | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index 6c30b50..6df6d1b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -22,4 +22,8 @@ export default defineConfig({ image: { service: passthroughImageService(), }, + prefetch: { + defaultStrategy: "viewport", + prefetchAll: false, + }, }); diff --git a/src/components/molecules/PostCard.astro b/src/components/molecules/PostCard.astro index b0f89d6..3ad6dd9 100644 --- a/src/components/molecules/PostCard.astro +++ b/src/components/molecules/PostCard.astro @@ -10,7 +10,7 @@ const dateTypeCreatedAt = new Date(createdAt); ---
- +

diff --git a/src/pages/introduction.astro b/src/pages/introduction.astro index 88936fd..241c08d 100644 --- a/src/pages/introduction.astro +++ b/src/pages/introduction.astro @@ -1,4 +1,5 @@ --- +export const prerender = true; import Layout from "../layouts/Layout.astro"; ---