prefetch all links
Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
parent
5ac061ca7d
commit
7bd3a6f06a
@ -21,6 +21,9 @@ export default defineConfig({
|
|||||||
image({
|
image({
|
||||||
serviceEntryPoint: "@astrojs/image/sharp",
|
serviceEntryPoint: "@astrojs/image/sharp",
|
||||||
}),
|
}),
|
||||||
|
prefetch({
|
||||||
|
selector: "a",
|
||||||
|
}),
|
||||||
sitemap(),
|
sitemap(),
|
||||||
prefetch(),
|
prefetch(),
|
||||||
],
|
],
|
||||||
|
@ -25,7 +25,7 @@ const posts = await getPosts();
|
|||||||
{
|
{
|
||||||
posts.length > 0 ? (
|
posts.length > 0 ? (
|
||||||
posts.map((post) => (
|
posts.map((post) => (
|
||||||
<a href={`/posts/${post.id}/`} rel="prefetch">
|
<a href={`/posts/${post.id}/`}>
|
||||||
<article class="text-gray bg-gray-light px-5 py-3 rounded-md shadow-md w-64 text-center hover:-translate-y-1 transition-transform">
|
<article class="text-gray bg-gray-light px-5 py-3 rounded-md shadow-md w-64 text-center hover:-translate-y-1 transition-transform">
|
||||||
<h3 class="font-bold text-lg" transition:name=`title-${post.id}`>{post.title}</h3>
|
<h3 class="font-bold text-lg" transition:name=`title-${post.id}`>{post.title}</h3>
|
||||||
{post.publishedDate && (
|
{post.publishedDate && (
|
||||||
|
Loading…
Reference in New Issue
Block a user