Skip to content

Commit

Permalink
Merge pull request #94 from Yoshino-Yukitaro/develop
Browse files Browse the repository at this point in the history
feat: pre-renderを設定した
  • Loading branch information
Yoshino-Yukitaro authored Mar 15, 2024
2 parents 6ca1e9d + 37047c6 commit 145d28d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ export default defineConfig({
image: {
service: passthroughImageService(),
},
prefetch: {
defaultStrategy: "viewport",
prefetchAll: false,
},
});
2 changes: 1 addition & 1 deletion src/components/molecules/PostCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const dateTypeCreatedAt = new Date(createdAt);
---

<section class="my-5 py-2 w-full bg-amber-50 dark:bg-gray-500 shadow-xl px-8 md:h-60 rounded-lg">
<a href={url} class="w-full hover:opacity-50">
<a href={url} class="w-full hover:opacity-50" data-astro-prefetch>
<div class="flex flex-row justify-between pb-2 md:pb-5">
<div class="flex flex-col">
<p class="pb-2 md:pb-5 dark:text-white text-sm md:text-base">
Expand Down
1 change: 1 addition & 0 deletions src/pages/introduction.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
export const prerender = true;
import Layout from "../layouts/Layout.astro";
---

Expand Down

0 comments on commit 145d28d

Please sign in to comment.