Skip to content

Commit 0880c63

Browse files
committed
fmt
1 parent d39680a commit 0880c63

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.vitepress/config/shared.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const sharedConfig = defineConfig({
6565
head,
6666
lastUpdated: false,
6767
transformPageData(pageData) {
68-
pageData.frontmatter.head ??= []
68+
pageData.frontmatter.head ??= [];
6969

7070
if (pageData.frontmatter.canonical) {
7171
pageData.frontmatter.head.push([
@@ -79,14 +79,15 @@ export const sharedConfig = defineConfig({
7979

8080
// Add page-specific Open Graph and Twitter meta tags
8181
const title = pageData.frontmatter.title || pageData.title;
82-
const description = pageData.frontmatter.description || pageData.description || "A collection of high-performance JavaScript tools written in Rust";
82+
const description = pageData.frontmatter.description || pageData.description
83+
|| "A collection of high-performance JavaScript tools written in Rust";
8384

8485
// Construct the canonical URL for the page
8586
let url = "https://oxc.rs";
8687
if (pageData.relativePath !== "index.md") {
87-
const path = pageData.relativePath.replace(/\.md$/, '.html').replace(/\/index\.html$/, '/');
88+
const path = pageData.relativePath.replace(/\.md$/, ".html").replace(/\/index\.html$/, "/");
8889
if (path !== "index.html") {
89-
url += "/" + path.replace(/^\/+/, '');
90+
url += "/" + path.replace(/^\/+/, "");
9091
}
9192
}
9293

@@ -101,7 +102,6 @@ export const sharedConfig = defineConfig({
101102
}
102103

103104
pageData.frontmatter.head.push(["meta", { property: "og:url", content: url }]);
104-
105105
},
106106
themeConfig: {
107107
siteTitle: "Oxc",

0 commit comments

Comments
 (0)