Skip to content

Commit 77a38b0

Browse files
authored
docs: test og fix (#1794)
1 parent f69fe62 commit 77a38b0

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

.vitepress/config.ts

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ export default {
9595
],
9696
["meta", { httpEquiv: "Content-Language", content: "en" }],
9797
["meta", { name: "twitter:card", content: "summary_large_image" }],
98-
["meta", { name: "twitter:image", content: "/Celestia-og.png" }],
98+
[
99+
"meta",
100+
{
101+
name: "twitter:image",
102+
content: "https://docs.celestia.org/Celestia-og.png",
103+
},
104+
],
99105
[
100106
"meta",
101107
{
@@ -110,7 +116,15 @@ export default {
110116
content: "https://docs.celestia.org",
111117
},
112118
],
113-
["meta", { name: "og:image", content: "/Celestia-og.png" }],
119+
[
120+
"meta",
121+
{
122+
property: "og:image",
123+
content: "https://docs.celestia.org/Celestia-og.png",
124+
},
125+
],
126+
["meta", { property: "og:type", content: "website" }],
127+
["meta", { property: "og:site_name", content: "Celestia Docs" }],
114128
["meta", { name: "apple-mobile-web-app-title", content: "Celestia" }],
115129
[
116130
"script",
@@ -232,20 +246,26 @@ export default {
232246
},
233247
transformPageData(pageData) {
234248
pageData.frontmatter.head ??= [];
235-
pageData.frontmatter.head.push([
236-
"meta",
237-
{
238-
name: "og:title",
239-
content:
240-
pageData.frontmatter.layout === "home"
241-
? `Celestia Docs`
242-
: `${pageData.title} | Celestia Docs`,
243-
},
244-
{
245-
name: "og:description",
246-
content: pageData.frontmatter.layout === `${pageData.description}`,
247-
},
248-
]);
249+
pageData.frontmatter.head.push(
250+
[
251+
"meta",
252+
{
253+
property: "og:title",
254+
content:
255+
pageData.frontmatter.layout === "home"
256+
? "Celestia Docs"
257+
: `${pageData.title} | Celestia Docs`,
258+
},
259+
],
260+
[
261+
"meta",
262+
{
263+
property: "og:description",
264+
content:
265+
pageData.description || "The first modular blockchain network.",
266+
},
267+
],
268+
);
249269
},
250270
};
251271

0 commit comments

Comments
 (0)