Skip to content

Commit 27d612a

Browse files
authored
Update docs (brianc#2867)
- fix config warnings - add search bar - add google analytics
1 parent 12b9a69 commit 27d612a

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

docs/theme.config.js

+32-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
// theme.config.js
22
export default {
3-
projectLink: 'https://github.com/brianc/node-postgres', // GitHub link in the navbar
4-
docsRepositoryBase: 'https://github.com/brianc/node-postgres/blob/master', // base URL for the docs repository
3+
project: {
4+
link: 'https://github.com/brianc/node-postgres',
5+
},
6+
twitter: {
7+
cardType: 'summary_large_image',
8+
site: 'https://node-postgres.com',
9+
},
10+
docsRepositoryBase: 'https://github.com/brianc/node-postgres/blob/master/docs', // base URL for the docs repository
511
titleSuffix: ' – node-postgres',
6-
nextLinks: true,
7-
prevLinks: true,
8-
search: true,
9-
customSearch: null, // customizable, you can use algolia for example
1012
darkMode: true,
1113
footer: true,
12-
footerText: `MIT ${new Date().getFullYear()} © Brian Carlson.`,
13-
footerEditLink: `Edit this page on GitHub`,
14+
navigation: {
15+
prev: true,
16+
next: true,
17+
},
18+
footer: {
19+
text: `MIT ${new Date().getFullYear()} © Brian Carlson.`,
20+
},
21+
editLink: {
22+
text: 'Edit this page on GitHub',
23+
},
1424
logo: (
1525
<>
1626
<svg>...</svg>
@@ -22,6 +32,20 @@ export default {
2232
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2333
<meta name="description" content="Nextra: the next docs builder" />
2434
<meta name="og:title" content="Nextra: the next docs builder" />
35+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-100138145-1"></script>
36+
<script
37+
dangerouslySetInnerHTML={{
38+
__html: `
39+
40+
window.dataLayer = window.dataLayer || [];
41+
function gtag(){dataLayer.push(arguments);}
42+
gtag('js', new Date());
43+
44+
gtag('config', 'UA-100138145-1');
45+
46+
`,
47+
}}
48+
></script>
2549
</>
2650
),
2751
}

0 commit comments

Comments
 (0)