1+ import { useRouter } from 'next/router'
2+ import seoConfig from './seo.config'
3+
4+ const config = {
5+ logo : "Peppermint" ,
6+ project : { link : 'https://github.com/Peppermint-Lab/peppermint' } ,
7+ useNextSeoProps ( ) {
8+ const { route } = useRouter ( )
9+ const { url, images } = seoConfig . openGraph
10+
11+ return {
12+ titleTemplate : seoConfig . title . template ,
13+ openGraph : { url, images : [ { url : `${ url } ${ images } ` } ] }
14+ }
15+ } ,
16+ docsRepositoryBase : 'https://github.com/Peppermint-Lab/docs' ,
17+ sidebar : {
18+ toggleButton : true ,
19+
20+ } ,
21+ // i18n: [
22+ // { locale: 'en', text: 'English' },
23+ // ],
24+ footer : '' ,
25+ banner : {
26+ key : '2.0-release' ,
27+ text : (
28+ < a href = "https://nextra.site" target = "_blank" >
29+ 🎉 Peppermint 0.3 is released. Read more →
30+ </ a >
31+ )
32+ } ,
33+ head : ( ) => {
34+ const title = seoConfig . title . template
35+
36+ return (
37+ < >
38+ { seoConfig . icons . map ( ( icon , index ) => (
39+ < link key = { index } rel = { icon . rel } href = { icon . url } />
40+ ) ) }
41+ < meta httpEquiv = "Content-Language" content = "en" />
42+ < meta
43+ name = "description"
44+ content = { seoConfig . description }
45+ />
46+ < meta
47+ name = "og:title"
48+ content = { title ? title + ' – Panda' : seoConfig . title . default }
49+ />
50+ < meta
51+ name = "og:description"
52+ content = { seoConfig . description }
53+ />
54+ < meta name = "og:image" content = { seoConfig . openGraph . images } />
55+ < meta name = "og:url" content = { seoConfig . openGraph . url } />
56+ < meta name = "twitter:card" content = "summary_large_image" />
57+ < meta name = "twitter:site" content = { seoConfig . twitter . site } />
58+ < meta name = "twitter:creator" content = { seoConfig . twitter . creator } />
59+ < meta name = "apple-mobile-web-app-title" content = "Panda" />
60+ </ >
61+ )
62+ }
63+ }
64+
65+ export default config
0 commit comments