Skip to content

Commit d1c9c42

Browse files
Convert from docusaurus to nextra (#4240)
This converts the existing docusaurus website to nextra just like https://github.com/graphql/graphql.github.io. This is a first step in moving the documentation here and having a redirect from graphql.org to graphql-js.org. Not sure yet why codecov started failing 😅 when I run `testonly:cover` locally it tells me we are 100% covered. WDYT about isolating the dependencies for the website in that folder? As seen in 9c7d615 this prevents the weird CI leaks that we're seeing Resolves #4200 --------- Co-authored-by: Yaacov Rydzinski <yaacovCR@gmail.com>
1 parent 2562ce0 commit d1c9c42

Some content is hidden

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

64 files changed

+17767
-25978
lines changed

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copied from '.gitignore', please keep it in sync.
22
/.eslintcache
3-
/.docusaurus
43
/node_modules
54
/coverage
65
/npmDist
76
/denoDist
87
/websiteDist
8+
/website
99

1010
# Ignore TS files inside integration test
1111
/integrationTests/ts/*.ts

.eslintrc.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,13 @@ rules:
466466
yield-star-spacing: off
467467

468468
overrides:
469-
- files: '**/*.ts'
469+
- files:
470+
- '**/*.ts'
471+
- '**/*.tsx'
470472
parser: '@typescript-eslint/parser'
471473
parserOptions:
472474
sourceType: module
473-
project: ['tsconfig.json']
475+
project: ['./tsconfig.json', './website/tsconfig.json']
474476
plugins:
475477
- '@typescript-eslint'
476478
- 'eslint-plugin-tsdoc'
@@ -726,6 +728,3 @@ overrides:
726728
import/no-commonjs: off
727729
import/no-nodejs-modules: off
728730
import/no-extraneous-dependencies: off
729-
# Ignore docusarus related webpack aliases
730-
import/no-unresolved:
731-
['error', { 'ignore': ['^@theme', '^@docusaurus', '^@generated'] }]

.github/workflows/ci.yml

-32
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ jobs:
7272
- name: Install Dependencies
7373
run: npm ci --ignore-scripts
7474

75-
# Disabled due to https://github.com/milesj/docusaurus-plugin-typedoc-api/pull/19
76-
# - name: Check that package-lock.json doesn't have conflicts
77-
# run: npm ls --depth 999
78-
7975
- name: Run npm install
8076
run: npm install --ignore-scripts --force --package-lock-only --engine-strict --strict-peer-deps
8177

@@ -219,7 +215,6 @@ jobs:
219215
- name: Setup Node.js
220216
uses: actions/setup-node@v2
221217
with:
222-
cache: npm
223218
node-version-file: '.node-version'
224219

225220
- name: Install Dependencies
@@ -233,30 +228,3 @@ jobs:
233228
with:
234229
name: denoDist
235230
path: ./denoDist
236-
237-
build-website-dist:
238-
name: Build website
239-
runs-on: ubuntu-latest
240-
steps:
241-
- name: Checkout repo
242-
uses: actions/checkout@v2
243-
with:
244-
persist-credentials: false
245-
246-
- name: Setup Node.js
247-
uses: actions/setup-node@v2
248-
with:
249-
cache: npm
250-
node-version-file: '.node-version'
251-
252-
- name: Install Dependencies
253-
run: npm ci --ignore-scripts
254-
255-
- name: Build Docs
256-
run: npm run build:website
257-
258-
- name: Upload denoDist package
259-
uses: actions/upload-artifact@v4
260-
with:
261-
name: websiteDist
262-
path: ./websiteDist

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
/diff-npm-package.html
99
/.eslintcache
1010
/.cspellcache
11-
/.docusaurus
12-
/node_modules
11+
node_modules
1312
/coverage
1413
/npmDist
1514
/denoDist
1615
/websiteDist
16+
/website/.next
17+
/website/out

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Copied from '.gitignore', please keep it in sync.
22
/diff-npm-package.html
33
/.eslintcache
4-
/.docusaurus
54
/node_modules
65
/coverage
76
/npmDist
87
/denoDist
98
/websiteDist
9+
/website/out
10+
.next

cspell.yml

+54-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ ignorePaths:
99
- tsconfig.json
1010
- benchmark/github-schema.graphql
1111
- benchmark/github-schema.json
12+
- website/icons
13+
- website/css
1214
overrides:
13-
- filename: '**/docs-old/APIReference-*.md'
14-
ignoreRegExpList: ['/href="[^"]*"/']
1515
- filename: 'website/**'
1616
dictionaries:
1717
- fullstack
@@ -52,6 +52,58 @@ words:
5252
- deno
5353
- codecov
5454

55+
# Website tech
56+
- Nextra
57+
- headlessui
58+
- Fastify
59+
- svgr
60+
- ruru
61+
62+
# used as href anchors
63+
- graphqlerror
64+
- syntaxerror
65+
- formaterror
66+
- graphqlschema
67+
- graphqlscalartype
68+
- graphqlobjecttype
69+
- graphqlinterfacetype
70+
- graphqluniontype
71+
- graphqlenumtype
72+
- graphqlinputobjecttype
73+
- graphqllist
74+
- graphqlnonnull
75+
- graphqlint
76+
- graphqlfloat
77+
- graphqlstring
78+
- graphqlboolean
79+
- graphqlid
80+
- getlocation
81+
- isinputtype
82+
- isoutputtype
83+
- isleaftype
84+
- iscompositetype
85+
- isabstracttype
86+
- getnullabletype
87+
- getnamedtype
88+
- introspectionquery
89+
- buildclientschema
90+
- buildschema
91+
- printschema
92+
- printintrospectionschema
93+
- buildastschema
94+
- typefromast
95+
- astfromvalue
96+
- typeinfo
97+
- isvalidjsvalue
98+
- isvalidliteralvalue
99+
- specifiedrules
100+
- Wordmark
101+
- codeofconduct
102+
- graphqlconf
103+
104+
# website words
105+
- runtimes
106+
55107
# TODO: remove bellow words
56108
- QLID # GraphQLID
57109
- QLJS # GraphQLJS

docs-old/APIReference-GraphQL.md

-179
This file was deleted.

0 commit comments

Comments
 (0)