forked from caching-tools/next-shared-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.config.jsx
60 lines (55 loc) · 1.74 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
import { useRouter } from 'next/router';
import { useConfig } from 'nextra-theme-docs';
function Head() {
const { asPath } = useRouter();
const { frontMatter } = useConfig();
const url = `https://caching-tools.github.io/next-shared-cache${asPath}`;
return (
<>
<meta content={url} property="og:url" />
<meta content={frontMatter.title || '@neshca/cache-handler'} property="og:title" />
<meta
content={frontMatter.description || '@neshca/cache-handler documentation'}
property="og:description"
/>
</>
);
}
export default {
logo: <pre>@neshca/cache-handler</pre>,
project: {
link: 'https://github.com/caching-tools/next-shared-cache',
},
docsRepositoryBase: 'https://github.com/caching-tools/next-shared-cache/tree/canary/docs/cache-handler-docs',
useNextSeoProps() {
const { asPath } = useRouter();
if (asPath !== '/') {
return {
titleTemplate: '%s — @neshca/cache-handler',
};
}
return {
titleTemplate: '@neshca/cache-handler',
};
},
head: Head,
footer: {
text: (
<span>
MIT {new Date().getFullYear()} ©{' '}
<a href="https://github.com/caching-tools/next-shared-cache" rel="noopener" target="_blank">
@neshca/cache-handler
</a>
.
</span>
),
},
banner: {
key: '0.5.1-release',
text: (
<a href={`${process.env.NEXT_PUBLIC_BASE_URL}/redis-stack`}>
🎉 Version 0.5.2 is out. onCreation now accepts async functions!
</a>
),
},
};