Skip to content

Commit e137aae

Browse files
committed
Start work on new design
1 parent 040b706 commit e137aae

File tree

7 files changed

+433
-241
lines changed

7 files changed

+433
-241
lines changed

website/next.config.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import nextra from 'nextra'
22

3-
import { translate } from '@edgeandnode/gds'
3+
import { defaultLocale, translate } from '@edgeandnode/gds'
44

55
// Compile `i18n.ts` to `i18n.js` since we can't import `ts` files in `next.config.js`
66
import { translations } from './dist/i18n.js'
@@ -28,26 +28,25 @@ const withNextra = nextra({
2828
defaultShowCopyCode: false,
2929
readingTime: true,
3030
transformPageMap(pageMap) {
31-
const locale = pageMap[0].route.slice(1, 3)
31+
const route = pageMap[0]?.route
32+
const locale = typeof route === 'string' ? route.slice(1, 3) : defaultLocale
3233
const t = (key) => translate(translations, locale, `global.sidebar.${key}`)
3334

3435
const metaFile = {
35-
index: t('index'),
36-
'---1': {
36+
'---0': {
3737
type: 'separator',
38+
title: 'Introduction',
3839
},
40+
index: t('index'),
3941
about: '',
4042
network: t('network'),
4143
sunrise: '',
4244
billing: '',
4345
glossary: '',
4446
tokenomics: '',
4547
arbitrum: t('arbitrum'),
46-
'---2': {
48+
'---1': {
4749
type: 'separator',
48-
},
49-
'###1': {
50-
type: 'heading',
5150
title: t('subgraphs'),
5251
},
5352
'quick-start': '',
@@ -58,19 +57,13 @@ const withNextra = nextra({
5857
querying: t('querying'),
5958
cookbook: t('cookbook'),
6059
'release-notes': t('releaseNotes'),
61-
'---3': {
60+
'---2': {
6261
type: 'separator',
63-
},
64-
'###2': {
65-
type: 'heading',
6662
title: t('substreams'),
6763
},
6864
substreams: '',
69-
'---4': {
65+
'---3': {
7066
type: 'separator',
71-
},
72-
'###3': {
73-
type: 'heading',
7467
title: t('indexing'),
7568
},
7669
'operating-graph-node': '',
@@ -146,7 +139,7 @@ export default withNextra({
146139
unoptimized: true,
147140
},
148141
i18n: {
149-
defaultLocale: 'en',
142+
defaultLocale,
150143
locales: Object.keys(translations),
151144
},
152145
})

0 commit comments

Comments
 (0)