chore: fix warning and remove unless config code
This commit is contained in:
parent
aaaf100d2c
commit
fda8a2fcd1
2 changed files with 5 additions and 5 deletions
|
|
@ -5,6 +5,7 @@ import { defineConfig } from "astro/config"
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
output: "static",
|
||||||
site: "https://astro-air.netlify.app",
|
site: "https://astro-air.netlify.app",
|
||||||
vite: {
|
vite: {
|
||||||
worker: {
|
worker: {
|
||||||
|
|
@ -12,5 +13,4 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
integrations: [react(), tailwind(), mdx()],
|
integrations: [react(), tailwind(), mdx()],
|
||||||
viewTransitions: true,
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,8 @@ const config = lang === "zh" ? zh.meta : en.meta
|
||||||
<meta property="twitter:description" content={description} />
|
<meta property="twitter:description" content={description} />
|
||||||
<meta property="twitter:image" content={ogImageURL} />
|
<meta property="twitter:image" content={ogImageURL} />
|
||||||
|
|
||||||
<ClientRouter />
|
<ClientRouter fallback="swap" />
|
||||||
|
|
||||||
<script is:inline>
|
<script is:inline>
|
||||||
const setTheme = () => {
|
const setTheme = () => {
|
||||||
const theme =
|
const theme =
|
||||||
|
|
@ -67,9 +68,8 @@ const config = lang === "zh" ? zh.meta : en.meta
|
||||||
|
|
||||||
setTheme()
|
setTheme()
|
||||||
|
|
||||||
document.addEventListener("astro:page-load", () => {
|
document.addEventListener("astro:after-swap", setTheme)
|
||||||
setTheme()
|
document.addEventListener("astro:page-load", setTheme)
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script
|
<script
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue