Skip to content

chore: cleanup for Cloudflare migration #1593

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 20 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@ jobs:
with:
node-version: "18.15.0"

- name: Install system dependencies
run: |
sudo apt update
sudo apt-get update
sudo apt-get install libatk-bridge2.0-0

- run: yarn install

- name: Set Sched's API token env
run: echo "SCHED_ACCESS_TOKEN=${{ secrets.SCHED_ACCESS_TOKEN }}" >> .env.production

# Verify it compiles
- run: yarn build

# Doesn't pass ATM
# - run: yarn tsc --noEmit
6 changes: 1 addition & 5 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ const config: GatsbyConfig = {
"gatsby-plugin-postcss",
"gatsby-plugin-svgr",
"gatsby-plugin-anchor-links",
// optional based on env
...(!process.env.GATSBY_CLOUD && !process.env.GITHUB_ACTIONS
? ["gatsby-plugin-dynamic-open-graph-images"]
: []),
{
resolve: "gatsby-source-filesystem",
options: {
Expand Down Expand Up @@ -125,7 +121,7 @@ const config: GatsbyConfig = {
output: "/blog/rss.xml",
title: "Blog | GraphQL",
feed_url: "http://graphql.org/blog/rss.xml",
site_url: "http://graphql.org",
site_url: "http://graphql.org/",
},
],
},
Expand Down
87 changes: 43 additions & 44 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ScheduleSession } from "./src/components/Conf/Schedule/session-list"
import { SchedSpeaker } from "./src/components/Conf/Speakers/Speaker"
import { GatsbyNode } from "gatsby"
import { createOpenGraphImage } from "gatsby-plugin-dynamic-open-graph-images"
import * as path from "path"
import { glob } from "glob"
import { updateCodeData } from "./scripts/update-code-data/update-code-data"
Expand Down Expand Up @@ -213,27 +212,27 @@ export const createPages: GatsbyNode["createPages"] = async ({
},
})

if (!process.env.GATSBY_CLOUD && !process.env.GITHUB_ACTIONS) {
try {
createOpenGraphImage(createPage, {
outputDir: "../static/img/__og-image",
component: path.resolve("./src/templates/EventOgImageTemplate.tsx"),
size: {
width: 1200,
height: 630,
},
waitCondition: "networkidle0",
context: {
id: event.id,
title: event.name,
event,
speakers: eventSpeakers,
},
})
} catch {
console.log("Error creating OG image for", event.name)
}
}
// if (!process.env.GATSBY_CLOUD && !process.env.GITHUB_ACTIONS) {
// try {
// createOpenGraphImage(createPage, {
// outputDir: "../static/img/__og-image",
// component: path.resolve("./src/templates/EventOgImageTemplate.tsx"),
// size: {
// width: 1200,
// height: 630,
// },
// waitCondition: "networkidle0",
// context: {
// id: event.id,
// title: event.name,
// event,
// speakers: eventSpeakers,
// },
// })
// } catch {
// console.log("Error creating OG image for", event.name)
// }
// }
})

function withSpeakerInfo(session: ScheduleSession[]) {
Expand Down Expand Up @@ -268,28 +267,28 @@ export const createPages: GatsbyNode["createPages"] = async ({
},
})

if (!process.env.GATSBY_CLOUD && !process.env.GITHUB_ACTIONS) {
try {
createOpenGraphImage(createPage, {
outputDir: "../static/img/__og-image",
component: path.resolve(
"./src/templates/SpeakerOgImageTemplate.tsx"
),
size: {
width: 1200,
height: 630,
},
waitCondition: "networkidle0",
context: {
id: speaker.username,
title: speaker.name,
speaker,
},
})
} catch {
console.log("Error creating OG image for speaker ", speaker.name)
}
}
// if (!process.env.GATSBY_CLOUD && !process.env.GITHUB_ACTIONS) {
// try {
// createOpenGraphImage(createPage, {
// outputDir: "../static/img/__og-image",
// component: path.resolve(
// "./src/templates/SpeakerOgImageTemplate.tsx"
// ),
// size: {
// width: 1200,
// height: 630,
// },
// waitCondition: "networkidle0",
// context: {
// id: speaker.username,
// title: speaker.name,
// speaker,
// },
// })
// } catch {
// console.log("Error creating OG image for speaker ", speaker.name)
// }
// }
})
} catch (error) {
console.log("CATCH ME:", error)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"repository": "graphql/graphql.github.io website.",
"repository": "graphql/graphql.github.io website",
"private": true,
"version": "0.0.0",
"scripts": {
Expand All @@ -16,6 +16,7 @@
"resolutions": {
"graphql": "16.6.0"
},
"packageManager": "yarn@1.22.19",
"dependencies": {
"react-medium-image-zoom": "5.1.8",
"@graphql-tools/schema": "10.0.0",
Expand All @@ -33,7 +34,6 @@
"date-fns": "^2.30.0",
"gatsby": "5.10.0",
"gatsby-plugin-anchor-links": "1.2.1",
"gatsby-plugin-dynamic-open-graph-images": "^1.1.4",
"gatsby-plugin-feed": "5.10.0",
"gatsby-plugin-google-analytics": "5.10.0",
"gatsby-plugin-less": "7.10.0",
Expand Down
2 changes: 1 addition & 1 deletion src/content/graphql-js/Tutorial-GraphQLClients.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You should see the output returned as JSON:
{"data":{"hello":"Hello world!"}}
```

If you prefer to use a graphical user interface to send a test query, you can use clients such as [GraphiQL](https://github.com/graphql/graphiql) and [Insomnia](https://github.com/getinsomnia/insomnia).
If you prefer to use a graphical user interface to send a test query, you can use clients such as [GraphiQL](https://github.com/graphql/graphiql), [Insomnia](https://github.com/getinsomnia/insomnia), and [Postman](https://www.postman.com/product/graphql-client/).

It's also simple to send GraphQL from the browser. Open up http://localhost:4000/graphql, open a developer console, and paste in:

Expand Down
Loading