@@ -65,7 +65,7 @@ export const sharedConfig = defineConfig({
65
65
head,
66
66
lastUpdated : false ,
67
67
transformPageData ( pageData ) {
68
- pageData . frontmatter . head ??= [ ]
68
+ pageData . frontmatter . head ??= [ ] ;
69
69
70
70
if ( pageData . frontmatter . canonical ) {
71
71
pageData . frontmatter . head . push ( [
@@ -79,14 +79,15 @@ export const sharedConfig = defineConfig({
79
79
80
80
// Add page-specific Open Graph and Twitter meta tags
81
81
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" ;
83
84
84
85
// Construct the canonical URL for the page
85
86
let url = "https://oxc.rs" ;
86
87
if ( pageData . relativePath !== "index.md" ) {
87
- const path = pageData . relativePath . replace ( / \. m d $ / , ' .html' ) . replace ( / \/ i n d e x \. h t m l $ / , '/' ) ;
88
+ const path = pageData . relativePath . replace ( / \. m d $ / , " .html" ) . replace ( / \/ i n d e x \. h t m l $ / , "/" ) ;
88
89
if ( path !== "index.html" ) {
89
- url += "/" + path . replace ( / ^ \/ + / , '' ) ;
90
+ url += "/" + path . replace ( / ^ \/ + / , "" ) ;
90
91
}
91
92
}
92
93
@@ -101,7 +102,6 @@ export const sharedConfig = defineConfig({
101
102
}
102
103
103
104
pageData . frontmatter . head . push ( [ "meta" , { property : "og:url" , content : url } ] ) ;
104
-
105
105
} ,
106
106
themeConfig : {
107
107
siteTitle : "Oxc" ,
0 commit comments