feat: add basic working spa mode
This commit is contained in:
parent
4ab42f9543
commit
8033b18a64
5 changed files with 93 additions and 53 deletions
|
@ -19,6 +19,9 @@ interface Props {
|
|||
ogImage?: string;
|
||||
}
|
||||
|
||||
import { ClientRouter } from "astro:transitions";
|
||||
const spaEnabled = siteConfig.spa
|
||||
|
||||
const noscript = siteConfig.noClientJavaScript
|
||||
|
||||
const statisticsEnabled = siteConfig.siteAnalytics.enabled
|
||||
|
@ -44,6 +47,8 @@ const { title = pageTitle, author = siteConfig.defaultAuthor.name,description =
|
|||
<meta name="generator" content={Astro.generator} />
|
||||
<Meta title={pageTitle} author={author} description={description} ogImage={ogImage} />
|
||||
<title>{pageTitle}</title>
|
||||
{spaEnabled && <ClientRouter fallback="animate" />}
|
||||
<!--transitional animation is broken in firefox though-->
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue