Skip to content

Commit c0697ea

Browse files
committed
Make search and locale switcher functional
1 parent 44edce4 commit c0697ea

File tree

20 files changed

+559
-680
lines changed

20 files changed

+559
-680
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine AS builder
1+
FROM node:22-alpine AS builder
22

33
ARG ENVIRONMENT
44
ARG ORIGIN
@@ -17,7 +17,6 @@ WORKDIR /app
1717
COPY . ./
1818

1919
RUN pnpm install --frozen-lockfile
20-
2120
RUN pnpm build
2221

2322
FROM nginx:1.16.0-alpine

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Please read [`CONTRIBUTING.md`](https://github.com/graphprotocol/docs/blob/main/
88

99
## Local Setup
1010

11-
This project is built on [Next.js](https://nextjs.org/). You can run it on your machine, provided you have [Node 20+](https://nodejs.org/en/) and [`pnpm`](https://pnpm.io) installed.
11+
This project is built on [Next.js](https://nextjs.org/). You can run it on your machine, provided you have [Node 22+](https://nodejs.org/en/) and [`pnpm`](https://pnpm.io) installed.
1212

1313
First, clone the repo:
1414

packages/og-image/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"jest-image-snapshot": "^6.4.0",
2222
"tsx": "^4.19.2",
2323
"typescript": "^5.7.3",
24-
"vitest": "^1.6.0",
24+
"vitest": "^1.6.1",
2525
"wrangler": "^3.107.2"
2626
}
2727
}

pnpm-lock.yaml

Lines changed: 149 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/next.config.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,39 @@ const withNextra = nextra({
3030
transformPageMap(pageMap) {
3131
const route = pageMap[0]?.route
3232
const locale = typeof route === 'string' ? route.slice(1, 3) : defaultLocale
33-
const t = (key) => translate(translations, locale, `global.sidebar.${key}`)
33+
const t = (key) => translate(translations, locale, key)
3434

3535
const metaFile = {
36-
index: '',
36+
index: t('index.title'),
3737
about: '',
3838
'supported-networks': '',
3939
contracts: '',
4040
subgraphs: {
4141
type: 'children',
42-
title: t('subgraphs'),
42+
title: t('global.sidebar.subgraphs'),
4343
},
4444
substreams: {
4545
type: 'children',
46-
title: t('substreams'),
46+
title: t('global.sidebar.substreams'),
47+
},
48+
sps: {
49+
type: 'children',
50+
title: t('global.sidebar.sps'),
4751
},
4852
indexing: {
4953
type: 'children',
50-
title: t('indexing'),
54+
title: t('global.sidebar.indexing'),
5155
},
5256
'---1': {
5357
type: 'separator',
54-
title: t('resources'),
58+
title: t('global.sidebar.resources'),
5559
},
5660
resources: {
5761
type: 'children',
5862
},
5963
archived: {
6064
type: 'children',
61-
title: t('archived'),
65+
title: t('global.sidebar.archived'),
6266
},
6367
}
6468

website/scripts/move-pages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async function main() {
122122

123123
// Validate moves in English locale
124124
const sourceDirectory = path.join(PAGES_DIRECTORY, SOURCE_LOCALE)
125-
for (const { sourcePath, destinationPath } of filesToMove) {
125+
for (const { destinationPath } of filesToMove) {
126126
// Allow _meta.js files to exist in destination since we skip them during move if they exist
127127
if (path.basename(destinationPath) === META_FILENAME) {
128128
continue

website/src/IndexPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { NetworkIcon } from '@edgeandnode/go'
66

77
import { Image } from '@/components'
88
import { useI18n } from '@/i18n'
9-
10-
import { getSupportedNetworks } from './supportedNetworks'
9+
import { getSupportedNetworks } from '@/supportedNetworks'
1110

1211
export function Intro() {
1312
const { t } = useI18n()

0 commit comments

Comments
 (0)