Skip to content

Commit 767f928

Browse files
committed
feat: Update Open Graph meta tags for improved SEO and page title consistency
1 parent 1eedb33 commit 767f928

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.vitepress/config.mts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@ export default defineConfig({
77
title: "Penify",
88
titleTemplate: ":title",
99
description: "Effortlessly generate precise, human like docstrings for GitHub repos with Penify.",
10-
transformHead: ({pageData}) => {
10+
transformHead: ({ pageData }) => {
1111
const head: HeadConfig[] = [];
1212

1313
if (pageData.frontmatter.title) {
1414
head.push([
1515
"meta",
16-
{ property: "og:title", content: pageData.frontmatter.title },
16+
{ property: "og:title", content: `${pageData.frontmatter.title} | Penify.dev` },
17+
]);
18+
} else {
19+
head.push([
20+
"meta",
21+
{ property: "og:title", content: "Penify.dev | Automated Documentation Generation" },
1722
]);
1823
}
1924

@@ -22,8 +27,18 @@ export default defineConfig({
2227
"meta",
2328
{ property: "og:description", content: pageData.frontmatter.description },
2429
]);
30+
} else {
31+
head.push([
32+
"meta",
33+
{ property: "og:description", content: "Effortlessly generate precise, human-like docstrings for GitHub repos with Penify." },
34+
]);
2535
}
2636

37+
head.push([
38+
"meta",
39+
{ property: "og:url", content: `https://blogs.penify.dev${pageData.relativePath.replace(/\.md$/, '.html')}` },
40+
]);
41+
2742
if (pageData.frontmatter.keywords) {
2843
head.push([
2944
"meta",

0 commit comments

Comments
 (0)