fix: CI 三个 type error + build font 下载修复
1. ArchivePanel: category 类型 string|null 兼容
2. OG png: Buffer as BodyInit 类型断言
3. Navbar: LightDarkSwitch client:only ts-ignore
4. language-badge: _cssVar 未使用警告
5. build.yml: pnpm astro build → pnpm build(触发字体下载)
小橘 🍊(NEKO Team)
This commit is contained in:
parent
d5282ae03c
commit
3e5d8b5b58
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -64,4 +64,4 @@ jobs:
|
|||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run Astro Build
|
- name: Run Astro Build
|
||||||
run: pnpm astro build
|
run: pnpm build
|
||||||
|
|||||||
@ -19,7 +19,7 @@ interface Post {
|
|||||||
data: {
|
data: {
|
||||||
title: string;
|
title: string;
|
||||||
tags: string[];
|
tags: string[];
|
||||||
category?: string;
|
category?: string | null;
|
||||||
published: Date;
|
published: Date;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ let links: NavBarLink[] = navBarConfig.links.map(
|
|||||||
<Icon name="material-symbols:palette-outline" class="text-[1.25rem]"></Icon>
|
<Icon name="material-symbols:palette-outline" class="text-[1.25rem]"></Icon>
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
{/* @ts-ignore - Svelte client:only directive */}
|
||||||
<LightDarkSwitch client:only="svelte"></LightDarkSwitch>
|
<LightDarkSwitch client:only="svelte"></LightDarkSwitch>
|
||||||
<button aria-label="Menu" name="Nav Menu" class="btn-plain scale-animation rounded-lg w-11 h-11 active:scale-90 md:!hidden" id="nav-menu-switch">
|
<button aria-label="Menu" name="Nav Menu" class="btn-plain scale-animation rounded-lg w-11 h-11 active:scale-90 md:!hidden" id="nav-menu-switch">
|
||||||
<Icon name="material-symbols:menu-rounded" class="text-[1.25rem]"></Icon>
|
<Icon name="material-symbols:menu-rounded" class="text-[1.25rem]"></Icon>
|
||||||
|
|||||||
@ -237,7 +237,7 @@ export const GET: APIRoute = async ({ props }) => {
|
|||||||
|
|
||||||
const png = await sharp(Buffer.from(svg)).png().toBuffer();
|
const png = await sharp(Buffer.from(svg)).png().toBuffer();
|
||||||
|
|
||||||
return new Response(png, {
|
return new Response(png as unknown as BodyInit, {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "image/png",
|
"Content-Type": "image/png",
|
||||||
"Cache-Control": "public, max-age=31536000, immutable",
|
"Cache-Control": "public, max-age=31536000, immutable",
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export function pluginLanguageBadge() {
|
|||||||
return definePlugin({
|
return definePlugin({
|
||||||
name: "Language Badge",
|
name: "Language Badge",
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
baseStyles: ({ _cssVar }) => `
|
baseStyles: ({ _cssVar: _ }) => `
|
||||||
[data-language]::before {
|
[data-language]::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user