Skip to content

Commit c042efe

Browse files
benfacedimaMachina0xa3k5
authored
Redesign (v2) (#873)
* all in one * add temporarily missing images to make build pass * use the-guild-org/shared-config/setup@v1 * fix eslint * Update Dockerfile * Update packages/nextra-theme/src/index.tsx Co-authored-by: Benoît Rouleau <[email protected]> * Update packages/nextra-theme/src/index.tsx * Update website/scripts/fetch-remote-docs.ts Co-authored-by: Benoît Rouleau <[email protected]> * Update fetch-remote-docs.ts * Update website/scripts/fetch-remote-docs.ts * 2/4 move `@graphprotocol/nextra-theme` to `@graphprotocol/docs` (#732) * aa * more * lint fix * 3/4 Refactor `_meta.js` to prefer `sidebarTitle` (#733) * move mdxStyles * more * more * more * more * more * more * more * more * more * more * more * more * more * more * more * more * more * more * more * more * lint * update nextra * 4/4 move `pages` to `src/pages` (#734) * move pages to src * some refactoring * Update Node * Remove unneeded `try…catch` * `pnpm check:fix` --------- Co-authored-by: benface <[email protected]> --------- Co-authored-by: benface <[email protected]> * Update dependencies * Fix tests * Change `@` alias to `src/` and move some files around * Start work on new design * Temp stuff * Try to fix CI * Update dependencies * WIP * style updates (#854) * style updates * remove navbar hiding on small screens (this was a test) * align icons and nav labels to top * lint * remove unnecessary w-full * Make search and locale switcher functional * Add icons + refactor and improve how navigation groups are computed * Add “partially selected” state * Quick fix * Huge refactoring + add a bunch of missing components, still missing breadcrumbs * Fixes and improvements (thanks AK for the feedback!) * Home page content + footer + fixes and tweaks * Fixes and tweaks * Squash some TODOs * Remove console log * style tweaks for home page (#872) * Make 404 page work + improve footer + last couple tweaks and fixes * Missed this in the merge * Use `sidebarTitle` instead of `_meta.js` * Last minute fixes --------- Co-authored-by: Dimitri POSTOLOV <[email protected]> Co-authored-by: AK <[email protected]>
1 parent c06e99e commit c042efe

File tree

3,879 files changed

+102119
-92997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,879 files changed

+102119
-92997
lines changed

.eslintrc.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @ts-check
2+
13
const isVSCode = Boolean(process.env.VSCODE_PID)
24

35
/** @type {import('eslint').Linter.Config} */
@@ -21,7 +23,11 @@ module.exports = {
2123
// Only lint the English pages because the Markdown for the other languages is auto-generated from English (via Crowdin).
2224
// But include all languages when running the ESLint extension in VS Code (in case the user has "eslint.validate": ["mdx"]),
2325
// otherwise there will be random errors since the non-English files don't match any ruleset.
24-
files: [`website/pages/${!isVSCode ? 'en/' : ''}**/*.{md,mdx}`],
26+
files: [`website/src/pages/${isVSCode ? '' : 'en/'}**/*.{md,mdx}`],
27+
excludedFiles: [
28+
'website/src/pages/*/subgraphs/developing/creating/graph-ts/*.md',
29+
'website/src/pages/*/subgraphs/querying/graph-client/*.md',
30+
],
2531
parser: 'eslint-mdx',
2632
processor: 'mdx/remark',
2733
plugins: ['mdx'],

.github/workflows/ci-cd-pull-request.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020

2121
- name: Set up env
22-
uses: the-guild-org/shared-config/setup@main
23-
with:
24-
nodeVersion: 20
25-
packageManager: pnpm
22+
uses: the-guild-org/shared-config/setup@v1
2623

2724
- name: Install dependencies
2825
run: pnpm install
@@ -43,10 +40,7 @@ jobs:
4340
uses: actions/checkout@v4
4441

4542
- name: Set up env
46-
uses: the-guild-org/shared-config/setup@main
47-
with:
48-
nodeVersion: 20
49-
packageManager: pnpm
43+
uses: the-guild-org/shared-config/setup@v1
5044

5145
- name: Install dependencies
5246
run: pnpm install
@@ -67,10 +61,7 @@ jobs:
6761
uses: actions/checkout@v4
6862

6963
- name: Set up env
70-
uses: the-guild-org/shared-config/setup@main
71-
with:
72-
nodeVersion: 20
73-
packageManager: pnpm
64+
uses: the-guild-org/shared-config/setup@v1
7465

7566
- name: Install dependencies
7667
run: pnpm install
@@ -92,10 +83,7 @@ jobs:
9283
uses: actions/checkout@v4
9384

9485
- name: Set up env
95-
uses: the-guild-org/shared-config/setup@main
96-
with:
97-
nodeVersion: 20
98-
packageManager: pnpm
86+
uses: the-guild-org/shared-config/setup@v1
9987

10088
- name: Install dependencies
10189
run: pnpm install

.github/workflows/opengraph.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ jobs:
2424
ref: ${{ env.COMMIT }}
2525

2626
- name: Set up env
27-
uses: the-guild-org/shared-config/setup@main
28-
with:
29-
nodeVersion: 20
30-
packageManager: pnpm
27+
uses: the-guild-org/shared-config/setup@v1
3128

3229
- name: Deploy
3330
working-directory: ./packages/og-image

.github/workflows/website-integrity.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ jobs:
2121
run: git fetch origin main
2222

2323
- name: Set up env
24-
uses: the-guild-org/shared-config/setup@main
25-
with:
26-
nodeVersion: 20
27-
packageManager: pnpm
24+
uses: the-guild-org/shared-config/setup@v1
2825

2926
- name: Build Site
3027
run: pnpm build

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ build/
3737
.eslintcache
3838
dist/
3939
.turbo/
40-
packages/og-image/vender/*.wasm
40+
packages/og-image/vendor/*.wasm
4141
.wrangler/

.nvmrc

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

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
out/
44
pnpm-lock.yaml
55
dist/
6-
website/remote-files/*.json
6+
# ignore below md since they are fetched from GitHub
7+
website/src/pages/*/subgraphs/developing/creating/graph-ts/*.md
8+
website/src/pages/*/subgraphs/querying/graph-client/*.md

.remarkrc.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
import remarkFrontmatter from 'remark-frontmatter'
2+
3+
/**
4+
* This config is used by `eslint-plugin-mdx` to lint the MDX files, not by Nextra.
5+
* Nextra uses the remark and rehype plugins registered in `next.config.js`, under `mdxOptions`.
6+
*/
17
export default {
28
plugins: [
3-
'frontmatter', // should be defined
9+
remarkFrontmatter,
410
['remark-lint-first-heading-level', 2],
511
['remark-lint-restrict-elements', { type: 'heading', depth: 1 }],
612
'remark-lint-heading-increment',

Dockerfile

Lines changed: 3 additions & 6 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
@@ -14,14 +14,11 @@ RUN corepack enable pnpm
1414

1515
WORKDIR /app
1616

17-
COPY . .
18-
19-
# install the packages
20-
RUN pnpm install --frozen-lockfile --ignore-scripts
17+
COPY . ./
2118

19+
RUN pnpm install --frozen-lockfile
2220
RUN pnpm build
2321

24-
## production environment
2522
FROM nginx:1.16.0-alpine
2623

2724
COPY --from=builder ./app/nginx.conf /etc/nginx/

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

0 commit comments

Comments
 (0)