File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
- import { defineConfig } from "vitepress" ;
1
+ import { defineConfig , HeadConfig } from "vitepress" ;
2
2
import { search as koSearch } from "./ko.mts" ;
3
3
4
4
export const shared = defineConfig ( {
@@ -28,6 +28,17 @@ export const shared = defineConfig({
28
28
]
29
29
] ,
30
30
31
+ transformHead : ( { pageData } ) => {
32
+ const head : HeadConfig [ ] = [ ] ;
33
+ const title = pageData . frontmatter . title || 'Frontend Fundamentals' ;
34
+ const description = pageData . frontmatter . description || 'Guidelines for easily modifiable frontend code' ;
35
+
36
+ head . push ( [ 'meta' , { property : 'og:title' , content : title } ] ) ;
37
+ head . push ( [ 'meta' , { property : 'og:description' , content : description } ] ) ;
38
+
39
+ return head ;
40
+ } ,
41
+
31
42
themeConfig : {
32
43
logo : "/images/ff-symbol.svg" ,
33
44
You can’t perform that action at this time.
0 commit comments