Skip to content

Commit 32fae85

Browse files
committed
fix about default og:image
1 parent 0f17c40 commit 32fae85

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@tailwindcss/typography": "^0.5.16",
1313
"astro": "^5.5.5",
1414
"astro-icon": "^1.1.5",
15-
"bits-ui": "^1.3.13",
15+
"bits-ui": "^1.3.14",
1616
"daisyui": "^5.0.9",
1717
"date-fns": "^4.1.0",
1818
"markdown-to-txt": "^2.0.1",
@@ -409,7 +409,7 @@
409409

410410
"base-64": ["[email protected]", "", {}, "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="],
411411

412-
"bits-ui": ["[email protected].13", "", { "dependencies": { "@floating-ui/core": "^1.6.4", "@floating-ui/dom": "^1.6.7", "@internationalized/date": "^3.5.6", "esm-env": "^1.1.2", "runed": "^0.23.2", "svelte-toolbelt": "^0.7.1", "tabbable": "^6.2.0" }, "peerDependencies": { "svelte": "^5.11.0" } }, "sha512-0ysKdvHBIArfFBe+MYVAvu5OANOsivk+UJftdiW+e6lGHzf+EW/TZpLh69Vf0n8pYTjkH+33CHlVIImxTZRIMQ=="],
412+
"bits-ui": ["[email protected].14", "", { "dependencies": { "@floating-ui/core": "^1.6.4", "@floating-ui/dom": "^1.6.7", "@internationalized/date": "^3.5.6", "esm-env": "^1.1.2", "runed": "^0.23.2", "svelte-toolbelt": "^0.7.1", "tabbable": "^6.2.0" }, "peerDependencies": { "svelte": "^5.11.0" } }, "sha512-T4ClhH0eQmrhZ8uMfC8Q4WBcpygnfdVTfb/1Y/6PrYA5Fqv7HTLmK3B9NSv4DUbDXpuG4SiC2cPSXVUqsEA/aw=="],
413413

414414
"boolbase": ["[email protected]", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="],
415415

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@tailwindcss/typography": "^0.5.16",
3232
"astro": "^5.5.5",
3333
"astro-icon": "^1.1.5",
34-
"bits-ui": "^1.3.13",
34+
"bits-ui": "^1.3.14",
3535
"daisyui": "^5.0.9",
3636
"date-fns": "^4.1.0",
3737
"markdown-to-txt": "^2.0.1",

src/layouts/GlobalLayout.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { ClientRouter } from "astro:transitions";
33
import Footer from "+/components/Footer.astro";
44
import Header from "+/components/Header.astro";
5-
import Logo from "+/images/logo/normal.svg";
65
import type { Focus } from "+/schema";
76
import Meta from "./meta.astro";
87
@@ -17,7 +16,7 @@ const { title, description, focus, image } = Astro.props;
1716
---
1817

1918
<html lang="ja" class="bg-gray-50 text-gray-800" data-theme="light">
20-
<Meta {title} {description} image={image ?? Logo} />
19+
<Meta {title} {description} image={image} />
2120
<body class="min-h-full w-full">
2221
<style is:global>
2322
@import "+/global.css";

src/layouts/meta.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ interface Props {
33
title: string | null;
44
description: string | null;
55
keywords?: string[];
6-
image: ImageMetadata;
6+
image: ImageMetadata | null;
77
}
88
const { title, description, keywords = [], image } = Astro.props;
99
const url = Astro.url.href;
@@ -22,7 +22,7 @@ const url = Astro.url.href;
2222
<meta property="og:site_name" content="ut.code();" />
2323
<meta property="og:title" content={title} />
2424
{description && <meta property="og:description" content={description} />}
25-
<meta property="og:image" content={image.src} />
25+
<meta property="og:image" content={image?.src ?? "/utcode-logo/normal.svg"} />
2626
<meta property="og:url" content={url} />
2727
<meta property="og:locale" content="ja_JP" />
2828
<meta name="twitter:card" content="summary_large_image" />

0 commit comments

Comments
 (0)