Skip to content

Commit a11bf5d

Browse files
Fix OG Images
1 parent 7b41cb1 commit a11bf5d

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/layouts/BlogPost.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import "../styles/shiki-highlight.css"
55
import BaseHead from "../components/BaseHead.astro"
66
import BlogPost from "../components/BlogPost.astro"
77
import BaseTopOfBody from "src/components/BaseTopOfBody.astro"
8-
import path from "path"
98
109
const { content } = Astro.props
1110
const {
@@ -21,7 +20,7 @@ const url = Astro.request.url
2120

2221
<html lang={content.lang || "en"}>
2322
<head>
24-
<BaseHead {title} {description} permalink={url} image={path.join(url, "og.webp")} />
23+
<BaseHead {title} {description} permalink={url} image="/og.webp" />
2524
</head>
2625

2726
<body>

src/pages/index.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import "../styles/blog.css"
55
import BaseHead from "../components/BaseHead.astro"
66
import BlogList from "/src/components/BlogList.jsx"
77
import BaseTopOfBody from "src/components/BaseTopOfBody.astro"
8-
import path from "path"
98
109
interface MarkdownFrontmatter {
1110
date: number
@@ -51,7 +50,7 @@ const allPosts = allMarkdownPosts
5150

5251
<html lang="en">
5352
<head>
54-
<BaseHead {title} {description} {permalink} image={path.join(url, "og.webp")} />
53+
<BaseHead {title} {description} {permalink} image="/og.webp" />
5554

5655
<style>
5756
.content {

0 commit comments

Comments
 (0)