Skip to content

Commit

Permalink
docs: test og fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jcstein committed Nov 18, 2024
1 parent f69fe62 commit b204163
Showing 1 changed file with 36 additions and 16 deletions.
52 changes: 36 additions & 16 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ export default {
],
["meta", { httpEquiv: "Content-Language", content: "en" }],
["meta", { name: "twitter:card", content: "summary_large_image" }],
["meta", { name: "twitter:image", content: "/Celestia-og.png" }],
[
"meta",
{
name: "twitter:image",
content: "https://docs.celestia.org/Celestia-og.png",
},
],
[
"meta",
{
Expand All @@ -110,7 +116,15 @@ export default {
content: "https://docs.celestia.org",
},
],
["meta", { name: "og:image", content: "/Celestia-og.png" }],
[
"meta",
{
property: "og:image",
content: "https://docs.celestia.org/Celestia-og.png",
},
],
["meta", { property: "og:type", content: "website" }],
["meta", { property: "og:site_name", content: "Celestia Docs" }],
["meta", { name: "apple-mobile-web-app-title", content: "Celestia" }],
[
"script",
Expand Down Expand Up @@ -232,20 +246,26 @@ export default {
},
transformPageData(pageData) {
pageData.frontmatter.head ??= [];
pageData.frontmatter.head.push([
"meta",
{
name: "og:title",
content:
pageData.frontmatter.layout === "home"
? `Celestia Docs`
: `${pageData.title} | Celestia Docs`,
},
{
name: "og:description",
content: pageData.frontmatter.layout === `${pageData.description}`,
},
]);
pageData.frontmatter.head.push(
[
"meta",
{
property: "og:title",
content:
pageData.frontmatter.layout === "home"
? "Celestia Docs"
: `${pageData.title} | Celestia Docs`,
},
],
[
"meta",
{
property: "og:description",
content:
pageData.description || "The first modular blockchain network.",
},
],
);
},
};

Expand Down

0 comments on commit b204163

Please sign in to comment.