File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
[
2
- { "authors" : [" yy" ],
2
+ {
3
+ "authors" : [" yy" ],
3
4
"path" : " yyblog.md" ,
4
5
"title" : " yyblog" ,
5
6
"tag" : " 技术/react" ,
6
7
"coverImage" : " https://p6-xtjj-sign.byteimg.com/tos-cn-i-73owjymdk6/0b76076eab124179816d68b846280cdc~tplv-73owjymdk6-jj-mark-v1:0:0:0:0:5o6Y6YeR5oqA5pyv56S-5Yy6IEAgTWVnYXRyb25LaW5n:q75.awebp?rk3s=f64ab15b&x-expires=1731736114&x-signature=3ggdE9od5WvMZaVJ7VFlQtt48rA%3D"
7
8
},
8
- { "authors" : [" yy" ],
9
+ {
10
+ "authors" : [" yy" ],
9
11
"path" : " react19.md" ,
10
12
"title" : " react19" ,
11
13
"tag" : " 随笔/生活" ,
Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ export const generateMetadata = async ({ params }: { params: any }): Promise<Met
27
27
const postData = postDataMap [ nid ] ;
28
28
const { title, summary } = postData ;
29
29
30
- const ogParams = new URLSearchParams ( ) ;
31
- ogParams . set ( 'title' , postData . title ) ;
32
- ogParams . set ( 'tag' , postData . tag ) ;
33
-
34
30
return {
35
31
authors : postData . authors ?. map ( ( author ) => ( {
36
32
name : author ,
@@ -47,7 +43,7 @@ export const generateMetadata = async ({ params }: { params: any }): Promise<Met
47
43
url : `/notes/${ nid } ` ,
48
44
images : [
49
45
{
50
- url : `/api/og?${ ogParams . toString ( ) } ` ,
46
+ url : `/api/og?title= ${ postData . title } &tag= ${ postData . tag } ` ,
51
47
alt : postData . title ,
52
48
} ,
53
49
] ,
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ export const metadata: Metadata = {
35
35
default : seo . title ,
36
36
template : '%s | zhw' ,
37
37
} ,
38
+ images : [
39
+ {
40
+ url : '/api/og' ,
41
+ alt : 'zhw blog' ,
42
+ } ,
43
+ ] ,
38
44
description : seo . description ,
39
45
siteName : 'zhw blog' ,
40
46
locale : 'zh_CN' ,
You can’t perform that action at this time.
0 commit comments