Skip to content

Commit 18470dc

Browse files
dimaMachinadanstarnsYassinEldeeb
authored
Refactor to Nextra instead of Gatsby (graphql#1604)
* squash everything * fix single-request move css more more improve animation more fixes * fix code/blog mobile issues * update speak page * add redirects * more redirects * 2024 year update * Update website/src/components/meetups.ts Co-authored-by: Daniel Starns <[email protected]> * move graphql-js tutorials * move * add graphql-js * fix type page * update og image * update og * hide graphql-js link on mobile * fix conf styles * fix some style issues * more fixes * add health safety * add redirects * fix redirects * fix redirects / events styles on mobile * update github stats and another fix of redirects * fix links in footer * add `schedule/:id` redirects to `/sessions/:id` * add `/conf/2023/schedule` redirects * fix redirects * update next.js to latest * fixes of broken links * add not-found.tsx * setup pnpm in ci * chore: prettier * prettier ignore * fix * fix * add env var * fix * place env file correctly * fix * setup workspace * fix * fix ci * fix node setup * fix deps issues * update lock * remove dev deps * update lock * update typescript * fix ci * cleanup * remove ci.yaml * fix links * fix link * fix * fix link * fix blog links * fix more blog links * fix * fix * fixes * fix * polishing --------- Co-authored-by: Daniel Starns <[email protected]> Co-authored-by: YassinEldeeb <[email protected]>
1 parent c3384a9 commit 18470dc

File tree

531 files changed

+28542
-17520
lines changed

Some content is hidden

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

531 files changed

+28542
-17520
lines changed

Diff for: .eslintrc.cjs

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
root: true,
33
overrides: [
44
{
5-
files: ["**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"],
5+
files: ["website/**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"],
66
extends: ["plugin:tailwindcss/recommended"],
77
parser: "@typescript-eslint/parser",
88
parserOptions: {
@@ -12,6 +12,16 @@ module.exports = {
1212
rules: {
1313
"tailwindcss/classnames-order": "off",
1414
},
15+
settings: {
16+
tailwindcss: {
17+
config: "website/tailwind.config.ts",
18+
cssFiles: [
19+
"website/node_modules/nextra-theme-docs/dist/style.css",
20+
"website/src/globals.css",
21+
],
22+
whitelist: ["roboto-mono"],
23+
},
24+
},
1525
},
1626
],
1727
}

Diff for: .github/workflows/CI.yml

-17
This file was deleted.

Diff for: .github/workflows/prettier.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v3
10+
11+
- uses: the-guild-org/shared-config/setup@main
12+
name: setup env
13+
with:
14+
nodeVersion: 20.1.0
15+
packageManager: pnpm
16+
workingDirectory: ./
17+
packageManagerVersion: 8.15.5
18+
1019
- name: Install Dependencies
11-
run: yarn
20+
run: pnpm install
1221
- name: Run Prettier Check
13-
run: yarn format:check
22+
run: pnpm format:check

Diff for: .gitignore

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ build/Release
3535

3636
# Dependency directories
3737
node_modules/
38-
jspm_packages/
3938

4039
# Typescript v1 declaration files
4140
typings/
@@ -57,7 +56,7 @@ typings/
5756

5857
# gatsby files
5958
.cache/
60-
public/
59+
/public/
6160

6261
!static/img/__og-image/
6362
static/img/__og-image/*
@@ -67,7 +66,6 @@ static/img/__og-image/*
6766
.DS_Store
6867

6968
# Yarn
70-
yarn-error.log
7169
.pnp/
7270
.pnp.js
7371
# Yarn Integrity file
@@ -80,3 +78,6 @@ yarn-error.log
8078
src/__generated__/
8179

8280
.idea/
81+
.next/
82+
static/sitemap.xml
83+
website/out/

Diff for: .prettierrc

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"arrowParens": "avoid",
33
"semi": false,
4-
"singleQuote": false
5-
}
4+
"singleQuote": false,
5+
"overrides": [
6+
{
7+
"files": "*.svg",
8+
"options": {
9+
"parser": "html"
10+
}
11+
}
12+
]
13+
}

Diff for: CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Run the `start` script to launch the server:
4949
yarn start
5050
```
5151

52-
Finally, open [http://localhost:8000](http://localhost:8000) to view it in the browser.
52+
Finally, open http://localhost:8000 to view it in the browser.
5353

54-
The GraphQL website is built with [Gatsby](https://www.gatsbyjs.com/docs/). This means that a hot-reloading development environment will be accessible by default.
54+
The GraphQL website is built with [Gatsby](https://gatsbyjs.com/docs). This means that a hot-reloading development environment will be accessible by default.
5555

5656
### Branching
5757

@@ -70,7 +70,7 @@ Active development for graphql.org happens on the `source` branch. Be sure to cr
7070

7171
### Publishing the updated site
7272

73-
Your changes will be merged into the `source` branch. Then, the CI will automatically publish a new version of http://graphql.org via [Netlify](https://docs.netlify.com/).
73+
Your changes will be merged into the `source` branch. Then, the CI will automatically publish a new version of https://graphql.org via [Netlify](https://docs.netlify.com).
7474

7575
## Updating content
7676

@@ -161,6 +161,6 @@ This repository is managed by EasyCLA. Project participants must sign the free (
161161

162162
To initiate the signature process please open a PR against this repo. The EasyCLA bot will block the merge if we still need a membership agreement from you.
163163

164-
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [[email protected]](mailto:[email protected]).
164+
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [email protected].
165165

166166
If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ This repository is managed by EasyCLA. Project participants must sign the free (
2626

2727
To initiate the signature process please open a PR against this repo. The EasyCLA bot will block the merge if we still need a membership agreement from you.
2828

29-
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [[email protected]](mailto:[email protected]).
29+
You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [email protected].
3030

3131
If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).

Diff for: gatsby-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const config: GatsbyConfig = {
9696
url: site.siteMetadata.siteUrl + permalink,
9797
description: excerpt,
9898
author: byline,
99-
})
99+
}),
100100
),
101101
query: /* GraphQL */ `
102102
{

Diff for: gatsby-node.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const fetchData = async (url: string) => {
135135
return data
136136
} catch (error) {
137137
throw new Error(
138-
`Error fetching data from ${url}: ${error.message || error.toString()}`
138+
`Error fetching data from ${url}: ${error.message || error.toString()}`,
139139
)
140140
}
141141
}
@@ -150,11 +150,11 @@ export const createPages: GatsbyNode["createPages"] = async ({
150150
const schedAccessToken = process.env.SCHED_ACCESS_TOKEN
151151

152152
const schedule: ScheduleSession[] = await fetchData(
153-
`https://graphqlconf23.sched.com/api/session/export?api_key=${schedAccessToken}&format=json`
153+
`https://graphqlconf23.sched.com/api/session/export?api_key=${schedAccessToken}&format=json`,
154154
)
155155

156156
const usernames: { username: string }[] = await fetchData(
157-
`https://graphqlconf23.sched.com/api/user/list?api_key=${schedAccessToken}&format=json&fields=username`
157+
`https://graphqlconf23.sched.com/api/user/list?api_key=${schedAccessToken}&format=json&fields=username`,
158158
)
159159

160160
// Fetch full info of each speaker individually and concurrently
@@ -163,9 +163,9 @@ export const createPages: GatsbyNode["createPages"] = async ({
163163
usernames.map(async user => {
164164
await new Promise(resolve => setTimeout(resolve, 2000)) // 2 second delay between requests, rate limit is 30req/min
165165
return fetchData(
166-
`https://graphqlconf23.sched.com/api/user/get?api_key=${schedAccessToken}&by=username&term=${user.username}&format=json&fields=username,company,position,name,about,location,url,avatar,role,socialurls`
166+
`https://graphqlconf23.sched.com/api/user/get?api_key=${schedAccessToken}&by=username&term=${user.username}&format=json&fields=username,company,position,name,about,location,url,avatar,role,socialurls`,
167167
)
168-
})
168+
}),
169169
)) as SchedSpeaker[]
170170
).filter(s => s.role.includes("speaker"))
171171

@@ -194,7 +194,7 @@ export const createPages: GatsbyNode["createPages"] = async ({
194194
// Create schedule events' pages
195195
schedule.forEach(event => {
196196
const eventSpeakers = speakers.filter(e =>
197-
event.speakers?.find(({ username }) => username === e.username)
197+
event.speakers?.find(({ username }) => username === e.username),
198198
)
199199

200200
createPage({

Diff for: notes/ContributingToCodePage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ app.all(
7070
createHandler({
7171
schema: schema,
7272
rootValue: root,
73-
})
73+
}),
7474
)
7575
app.listen(4000, () => console.log("Now browse to localhost:4000/graphql"))
7676
```

Diff for: package.json

+8-9
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"private": true,
44
"version": "0.0.0",
55
"scripts": {
6-
"build": "gatsby build",
6+
"build": "cd website && pnpm i && pnpm build",
77
"develop": "gatsby develop",
8-
"format": "yarn format:check --write",
8+
"format": "pnpm format:check --write",
99
"format:check": "prettier --cache --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
10-
"start": "yarn develop",
10+
"start": "pnpm develop",
1111
"serve": "gatsby serve",
1212
"clean": "gatsby clean",
1313
"lint": "eslint --ignore-path .gitignore .",
@@ -16,7 +16,6 @@
1616
"resolutions": {
1717
"graphql": "16.6.0"
1818
},
19-
"packageManager": "[email protected]",
2019
"dependencies": {
2120
"@graphql-tools/schema": "10.0.0",
2221
"@headlessui/react": "^1.7.17",
@@ -58,21 +57,21 @@
5857
},
5958
"devDependencies": {
6059
"@svgr/webpack": "^8.0.0",
61-
"@tailwindcss/typography": "0.5.9",
60+
"@tailwindcss/typography": "0.5.10",
6261
"@types/codemirror": "5.60.7",
6362
"@types/prismjs": "1.26.0",
6463
"@types/react-tooltip": "^4.2.4",
6564
"@types/string-similarity": "^4.0.0",
6665
"@typescript-eslint/parser": "5.59.7",
6766
"autoprefixer": "10.4.14",
6867
"eslint": "8.42.0",
69-
"eslint-plugin-tailwindcss": "3.12.0",
68+
"eslint-plugin-tailwindcss": "3.14.0",
7069
"gatsby-plugin-canonical-urls": "5.12.0",
7170
"gatsby-plugin-postcss": "6.10.0",
7271
"gatsby-plugin-svgr": "^3.0.0-beta.0",
7372
"postcss": "8.4.23",
74-
"prettier": "2.8.8",
75-
"tailwindcss": "3.3.2",
76-
"typescript": "5.1.3"
73+
"prettier": "3.2.4",
74+
"tailwindcss": "3.4.1",
75+
"typescript": "^5.3.3"
7776
}
7877
}

0 commit comments

Comments
 (0)