feat: Speculation Rules API in BaseLayout (prerender on hover/pointerdown)
All checks were successful
deploy / deploy (push) Successful in 1m1s
All checks were successful
deploy / deploy (push) Successful in 1m1s
This commit is contained in:
@@ -82,6 +82,28 @@ const jsonLd = [
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Cormorant+Garamond:wght@500;600;700&display=swap" rel="stylesheet" />
|
||||
|
||||
<Analytics />
|
||||
|
||||
<!--
|
||||
Speculation Rules API (Chromium 122+) — prerender same-origin pages on
|
||||
hover/pointerdown for near-instant navigation. Rules are static JSON,
|
||||
no user input → safe inline.
|
||||
-->
|
||||
<script type="speculationrules" is:inline set:html={JSON.stringify({
|
||||
prerender: [
|
||||
{
|
||||
where: {
|
||||
and: [
|
||||
{ href_matches: '/*' },
|
||||
{ not: { href_matches: '/assets/*' } },
|
||||
{ not: { href_matches: '/sitemap*' } },
|
||||
{ not: { href_matches: '/feed*' } },
|
||||
{ not: { href_matches: '/llms*' } }
|
||||
]
|
||||
},
|
||||
eagerness: 'moderate'
|
||||
}
|
||||
]
|
||||
})} />
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
|
||||
Reference in New Issue
Block a user