feat(config): 加入 cache: no-cache

2. feat(config): color-theme 支持在星期日自动更改为知更鸟颜色 #9e8eef
3. style(background): 关闭 background 功能
This commit is contained in:
Ad-closeNN
2025-08-15 23:17:48 +08:00
parent 0f1954d020
commit f9ccb0ca71
3 changed files with 16 additions and 2 deletions
+4
View File
@@ -0,0 +1,4 @@
[[headers]]
for = "/*"
[headers.values]
cache-control = "no-cache"
+1 -1
View File
@@ -27,7 +27,7 @@ export const siteConfig: SiteConfig = {
},
},
background: {
enable: true, // Enable background image
enable: false, // Enable background image
//src: "https://eo-pic.2x.nz/h", // Background image URL (supports HTTPS)
src: "https://bing.ee123.net/img", // Bing daily theme
position: "center", // Background position: 'top', 'center', 'bottom'
+10
View File
@@ -70,6 +70,10 @@ const bannerOffsetByPosition = {
};
const bannerOffset =
bannerOffsetByPosition[siteConfig.banner.position || "center"];
// 周日判断
const isSunday = new Date().getDay() === 0;
---
<!DOCTYPE html>
@@ -99,7 +103,13 @@ const bannerOffset =
<meta name="twitter:title" content={pageTitle}>
<meta name="twitter:description" content={description || pageTitle}>
{ isSunday &&
<meta name="theme-color" content="#9e8eef" />
}
{ !isSunday &&
<meta name="theme-color" content="#48823b" />
}
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
{favicons.map(favicon => (