-
Notifications
You must be signed in to change notification settings - Fork 13
/
theme.config.jsx
86 lines (82 loc) · 2.65 KB
/
theme.config.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import React from 'react';
import { useRouter } from 'next/router';
import { useConfig } from 'nextra-theme-docs';
const config = {
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== '/') {
return {
titleTemplate: '%s – Artus',
};
}
},
logo: (
<div className='nx-flex nx-items-center nx-justify-center nx-gap-2 nx-h-[var(--nextra-navbar-height)]'>
<img style={{ height: '24px' }} src='/logo/nodejs-logo.svg' alt='logo' />
<span className='nx-font-medium'>Artus</span>
</div>
),
project: {
link: 'https://github.com/artusjs/spec',
},
docsRepositoryBase: 'https://github.com/artusjs/spec/tree/master',
editLink: {
text: 'Edit this page on GitHub →',
},
feedback: {
content: 'Question? Give us feedback →',
labels: 'feedback',
},
toc: {
backToTop: true,
},
head: function useHead() {
const { title } = useConfig();
const { route } = useRouter();
const socialCard =
route === '/' || !title
? 'https://artusjs.org/og.png'
: `https://artusjs.org/api/og?title=${title}`;
return (
<>
<meta name='msapplication-TileColor' content='#fff' />
<meta name='theme-color' content='#fff' />
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
<meta httpEquiv='Content-Language' content='en' />
<meta
name='description'
content='Enterprise Node.js Framework for Web, RPC, Serverless, etc.'
/>
<meta
name='og:description'
content='Enterprise Node.js Framework for Web, RPC, Serverless, etc.'
/>
<meta name='twitter:card' content='summary_large_image' />
<meta name='twitter:image' content={socialCard} />
<meta name='twitter:site:domain' content='artusjs.org' />
<meta name='twitter:url' content='https://artusjs.org' />
<meta name='og:title' content={title ? title + ' – Artus' : 'Artus'} />
<meta name='og:image' content={socialCard} />
<meta name='apple-mobile-web-app-title' content='Artus' />
<link rel='icon' href='/logo/nodejs-logo.svg' type='image/svg+xml' />
<link
rel='icon'
href='/logo/nodejs-logo.svg'
type='image/svg+xml'
media='(prefers-color-scheme: dark)'
/>
</>
);
},
footer: {
text: (
<div className='nx-flex nx-flex nx-flex-col nx-gap-2'>
<span>Released under the MIT License.</span>
<span>
Copyright © 2022-present - China Open Node.js Framework Specification Working Group.
</span>
</div>
),
},
};
export default config;