-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.config.tsx
111 lines (101 loc) · 2.83 KB
/
theme.config.tsx
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import { useRouter } from "next/router";
import Script from "next/script";
import { DocsThemeConfig } from "nextra-theme-docs";
const config: DocsThemeConfig = {
head: () => {
const { asPath } = useRouter();
return (
<>
<link
rel="icon"
type="image/png"
href="https://barebitcoin.no/favicon.ico"
/>
<meta name="og:title" content="Hjelpesider for Bare Bitcoin" />
<meta // TODO: dynamic per article?
name="og:description"
content="Lær om bitcoin, og bruk av vekslingstjenesten Bare Bitcoin. Se svar på ofte stilte spørsmål, og få innspill til sikker og trygg bruk."
/>
<meta property="og:locale" content="no_NB" />
<meta
property="og:type"
content={
asPath === "/"
? "website" // root is a complete website
: "article" // everything else is an article
}
/>
<meta
// TODO: make this dynamic
name="og:image" // Default image for ALL sites image
content="https://barebitcoin.no/social-logo.png"
/>
<meta
name="twitter:image" // Twitter image
content="https://barebitcoin.no/social-logo.png"
/>
<noscript>
<Script src="https://sa.bb.no/latest.js" />
{/* https://docs.simpleanalytics.com/automated-events */}
<Script src="https://sa.bb.no/auto-events.js" />
{/* eslint-disable @next/next/no-img-element */}
<img
src="https://sa.bb.no/noscript.gif"
alt=""
referrerPolicy="no-referrer-when-downgrade"
/>
</noscript>
</>
);
},
logo: <span>Bare Bitcoin</span>,
chat: {
link: "https://discord.gg/qMhQvVbUeH",
},
project: { link: "https://github.com/barebitcoin/hjelp" },
docsRepositoryBase: "https://github.com/barebitcoin/hjelp/blob/master",
footer: {
text: "Bare Bitcoin",
},
search: {
placeholder: "Søk i dokumentasjon",
},
editLink: {
text: "",
},
toc: {
title: "På denne siden",
},
feedback: {
content: "Spørsmål? Gi oss feedback",
useLink: () => "https://github.com/barebitcoin/hjelp/discussions",
},
// https://nextra.site/docs/docs-theme/theme-configuration#seo-options
useNextSeoProps() {
return {
titleTemplate: "%s - Bare Bitcoin",
};
},
themeSwitch: {
useOptions() {
return {
dark: "Mørk",
light: "Lys",
system: "Standard",
};
},
},
gitTimestamp: ({ timestamp }) => (
<>
Sist oppdatert{" "}
<time dateTime={timestamp.toISOString()}>
{timestamp.toLocaleDateString("no-NB", {
day: "numeric",
month: "long",
year: "numeric",
})}
</time>
</>
),
};
export default config;