Skip to content

Refactor to Nextra instead of Gatsby #1604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 65 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ba5b789
squash everything
dimaMachina Mar 22, 2024
518d454
Merge branch 'source' into nextra
dimaMachina Mar 22, 2024
83f2a30
fix single-request
dimaMachina Mar 22, 2024
bd43699
fix code/blog mobile issues
dimaMachina Mar 24, 2024
e9753a5
update speak page
dimaMachina Mar 24, 2024
ad9cde8
add redirects
dimaMachina Mar 27, 2024
00f1b4a
more redirects
dimaMachina Mar 27, 2024
63537ae
2024 year update
dimaMachina Mar 27, 2024
6a4b1ea
Update website/src/components/meetups.ts
dimaMachina Mar 27, 2024
b3c92f1
move graphql-js tutorials
dimaMachina Mar 27, 2024
333de8a
move
dimaMachina Mar 27, 2024
457820e
add graphql-js
dimaMachina Mar 27, 2024
23f79fc
Merge branch 'nextra' of github.com:B2o5T/graphql.github.io into nextra
dimaMachina Mar 27, 2024
df2bdcd
fix type page
dimaMachina Mar 27, 2024
bcef14b
update og image
dimaMachina Mar 27, 2024
8007618
update og
dimaMachina Mar 27, 2024
cec1e92
hide graphql-js link on mobile
dimaMachina Mar 27, 2024
260e5eb
fix conf styles
dimaMachina Mar 27, 2024
960c8df
fix some style issues
dimaMachina Mar 27, 2024
84afd32
more fixes
dimaMachina Mar 27, 2024
e4d63b3
add health safety
dimaMachina Mar 27, 2024
084a4c7
add redirects
dimaMachina Mar 27, 2024
eb3a0be
fix redirects
dimaMachina Mar 27, 2024
dce3d59
fix redirects / events styles on mobile
dimaMachina Mar 27, 2024
137ec2a
update github stats and another fix of redirects
dimaMachina Mar 27, 2024
a4539cd
fix links in footer
dimaMachina Mar 27, 2024
9282383
add `schedule/:id` redirects to `/sessions/:id`
dimaMachina Mar 27, 2024
a397f8c
add `/conf/2023/schedule` redirects
dimaMachina Mar 27, 2024
f7e3463
fix redirects
dimaMachina Mar 27, 2024
528bb60
update next.js to latest
dimaMachina Mar 27, 2024
b1d464b
fixes of broken links
dimaMachina Mar 27, 2024
616161e
add not-found.tsx
dimaMachina Mar 27, 2024
8b82a64
setup pnpm in ci
YassinEldeeb Mar 27, 2024
4b2c97d
chore: prettier
YassinEldeeb Mar 27, 2024
44c8d08
prettier ignore
YassinEldeeb Mar 27, 2024
b65f334
fix
YassinEldeeb Mar 27, 2024
10a7ebf
fix
YassinEldeeb Mar 27, 2024
1523afa
add env var
YassinEldeeb Mar 27, 2024
e89205e
fix
YassinEldeeb Mar 27, 2024
ff1803c
place env file correctly
YassinEldeeb Mar 27, 2024
b0ffe01
fix
YassinEldeeb Mar 27, 2024
1fcaea0
setup workspace
YassinEldeeb Mar 28, 2024
5041614
fix
YassinEldeeb Mar 28, 2024
1c02894
fix ci
YassinEldeeb Mar 28, 2024
9041c13
fix node setup
YassinEldeeb Mar 28, 2024
95adfb6
fix deps issues
YassinEldeeb Mar 28, 2024
72aecb1
update lock
YassinEldeeb Mar 28, 2024
a49a539
remove dev deps
YassinEldeeb Mar 28, 2024
7462e86
update lock
YassinEldeeb Mar 28, 2024
e905495
update typescript
YassinEldeeb Mar 28, 2024
4b8a202
fix ci
YassinEldeeb Mar 28, 2024
1f66c83
cleanup
YassinEldeeb Mar 28, 2024
fcfef41
remove ci.yaml
YassinEldeeb Mar 28, 2024
d2d5d15
fix links
YassinEldeeb Mar 28, 2024
1ab10dc
fix link
YassinEldeeb Mar 28, 2024
b27d6f3
fix
YassinEldeeb Mar 28, 2024
84a5991
fix link
YassinEldeeb Mar 28, 2024
3b0ca3d
fix blog links
YassinEldeeb Mar 28, 2024
0c1dff1
fix more blog links
YassinEldeeb Mar 28, 2024
0db490c
fix
YassinEldeeb Mar 28, 2024
501f794
fix
YassinEldeeb Mar 28, 2024
ebc65e0
fixes
YassinEldeeb Mar 28, 2024
be32b92
fix
YassinEldeeb Mar 28, 2024
cd6cbe7
polishing
dimaMachina Mar 28, 2024
78ba0d9
Merge branch 'nextra' of github.com:B2o5T/graphql.github.io into nextra
dimaMachina Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 11 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
root: true,
overrides: [
{
files: ["**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"],
files: ["website/**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}"],
extends: ["plugin:tailwindcss/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
Expand All @@ -12,6 +12,16 @@ module.exports = {
rules: {
"tailwindcss/classnames-order": "off",
},
settings: {
tailwindcss: {
config: "website/tailwind.config.ts",
cssFiles: [
"website/node_modules/nextra-theme-docs/dist/style.css",
"website/src/globals.css",
],
whitelist: ["roboto-mono"],
},
},
},
],
}
17 changes: 0 additions & 17 deletions .github/workflows/CI.yml

This file was deleted.

13 changes: 11 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: the-guild-org/shared-config/setup@main
name: setup env
with:
nodeVersion: 20.1.0
packageManager: pnpm
workingDirectory: ./
packageManagerVersion: 8.15.5

- name: Install Dependencies
run: yarn
run: pnpm install
- name: Run Prettier Check
run: yarn format:check
run: pnpm format:check
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/
Expand All @@ -57,7 +56,7 @@ typings/

# gatsby files
.cache/
public/
/public/

!static/img/__og-image/
static/img/__og-image/*
Expand All @@ -67,7 +66,6 @@ static/img/__og-image/*
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
Expand All @@ -80,3 +78,6 @@ yarn-error.log
src/__generated__/

.idea/
.next/
static/sitemap.xml
website/out/
12 changes: 10 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"arrowParens": "avoid",
"semi": false,
"singleQuote": false
}
"singleQuote": false,
"overrides": [
{
"files": "*.svg",
"options": {
"parser": "html"
}
}
]
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Run the `start` script to launch the server:
yarn start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please confirm if its yarn start at the root or cd website && pnpm start.

```

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

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.
The GraphQL website is built with [Gatsby](https://gatsbyjs.com/docs). This means that a hot-reloading development environment will be accessible by default.

### Branching

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

### Publishing the updated site

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/).
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).

## Updating content

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

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.

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

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).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ This repository is managed by EasyCLA. Project participants must sign the free (

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.

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

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).
2 changes: 1 addition & 1 deletion gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const config: GatsbyConfig = {
url: site.siteMetadata.siteUrl + permalink,
description: excerpt,
author: byline,
})
}),
),
query: /* GraphQL */ `
{
Expand Down
12 changes: 6 additions & 6 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const fetchData = async (url: string) => {
return data
} catch (error) {
throw new Error(
`Error fetching data from ${url}: ${error.message || error.toString()}`
`Error fetching data from ${url}: ${error.message || error.toString()}`,
)
}
}
Expand All @@ -150,11 +150,11 @@ export const createPages: GatsbyNode["createPages"] = async ({
const schedAccessToken = process.env.SCHED_ACCESS_TOKEN

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

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

// Fetch full info of each speaker individually and concurrently
Expand All @@ -163,9 +163,9 @@ export const createPages: GatsbyNode["createPages"] = async ({
usernames.map(async user => {
await new Promise(resolve => setTimeout(resolve, 2000)) // 2 second delay between requests, rate limit is 30req/min
return fetchData(
`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`
`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`,
)
})
}),
)) as SchedSpeaker[]
).filter(s => s.role.includes("speaker"))

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

createPage({
Expand Down
2 changes: 1 addition & 1 deletion notes/ContributingToCodePage.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ app.all(
createHandler({
schema: schema,
rootValue: root,
})
}),
)
app.listen(4000, () => console.log("Now browse to localhost:4000/graphql"))
```
Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"private": true,
"version": "0.0.0",
"scripts": {
"build": "gatsby build",
"build": "cd website && pnpm i && pnpm build",
"develop": "gatsby develop",
"format": "yarn format:check --write",
"format": "pnpm format:check --write",
"format:check": "prettier --cache --check \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "yarn develop",
"start": "pnpm develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"lint": "eslint --ignore-path .gitignore .",
Expand All @@ -16,7 +16,6 @@
"resolutions": {
"graphql": "16.6.0"
},
"packageManager": "yarn@1.22.19",
"dependencies": {
"@graphql-tools/schema": "10.0.0",
"@headlessui/react": "^1.7.17",
Expand Down Expand Up @@ -58,21 +57,21 @@
},
"devDependencies": {
"@svgr/webpack": "^8.0.0",
"@tailwindcss/typography": "0.5.9",
"@tailwindcss/typography": "0.5.10",
"@types/codemirror": "5.60.7",
"@types/prismjs": "1.26.0",
"@types/react-tooltip": "^4.2.4",
"@types/string-similarity": "^4.0.0",
"@typescript-eslint/parser": "5.59.7",
"autoprefixer": "10.4.14",
"eslint": "8.42.0",
"eslint-plugin-tailwindcss": "3.12.0",
"eslint-plugin-tailwindcss": "3.14.0",
"gatsby-plugin-canonical-urls": "5.12.0",
"gatsby-plugin-postcss": "6.10.0",
"gatsby-plugin-svgr": "^3.0.0-beta.0",
"postcss": "8.4.23",
"prettier": "2.8.8",
"tailwindcss": "3.3.2",
"typescript": "5.1.3"
"prettier": "3.2.4",
"tailwindcss": "3.4.1",
"typescript": "^5.3.3"
}
}
Loading