File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { useRouter } from 'next/router'
1
2
import { DocsThemeConfig } from 'nextra-theme-docs'
2
3
import React from 'react'
3
4
@@ -10,6 +11,34 @@ const config: DocsThemeConfig = {
10
11
project : {
11
12
link : 'https://github.com/mcnaveen/cart' ,
12
13
} ,
14
+ useNextSeoProps ( ) {
15
+ const { asPath } = useRouter ( )
16
+ if ( asPath !== '/' ) {
17
+ return {
18
+ titleTemplate : '%s – Cart'
19
+ }
20
+ }
21
+ } ,
22
+ head : (
23
+ < >
24
+ < meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
25
+ < meta property = "og:title" content = "Cart - An Open Source headless cart management library" />
26
+ < meta property = "og:description" content = "$ npm install cart" />
27
+
28
+ < meta property = "og:type" content = "website" />
29
+ < meta property = "og:url" content = "https://cart.js.org/" />
30
+ < meta property = "og:title" content = "Cart - An Open Source headless cart management library" />
31
+ < meta property = "og:description" content = "$ npm install cart" />
32
+ < meta property = "og:image" content = "https://raw.githubusercontent.com/mcnaveen/cart/HEAD/image/cover.png" />
33
+
34
+ < meta property = "twitter:card" content = "summary_large_image" />
35
+ < meta property = "twitter:url" content = "https://cart.js.org/" />
36
+ < meta property = "twitter:title" content = "Cart - An Open Source headless cart management library" />
37
+ < meta property = "twitter:description" content = "$ npm install cart" />
38
+ < meta property = "twitter:image" content = "https://raw.githubusercontent.com/mcnaveen/cart/HEAD/image/cover.png" />
39
+
40
+ </ >
41
+ )
13
42
}
14
43
15
44
export default config
You can’t perform that action at this time.
0 commit comments