Skip to content

Commit

Permalink
Convert from docusaurus to nextra (#4240)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
JoviDeCroock and yaacovCR authored Oct 20, 2024
1 parent 2562ce0 commit d1c9c42
Show file tree
Hide file tree
Showing 64 changed files with 17,767 additions and 25,978 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copied from '.gitignore', please keep it in sync.
/.eslintcache
/.docusaurus
/node_modules
/coverage
/npmDist
/denoDist
/websiteDist
/website

# Ignore TS files inside integration test
/integrationTests/ts/*.ts
9 changes: 4 additions & 5 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,13 @@ rules:
yield-star-spacing: off

overrides:
- files: '**/*.ts'
- files:
- '**/*.ts'
- '**/*.tsx'
parser: '@typescript-eslint/parser'
parserOptions:
sourceType: module
project: ['tsconfig.json']
project: ['./tsconfig.json', './website/tsconfig.json']
plugins:
- '@typescript-eslint'
- 'eslint-plugin-tsdoc'
Expand Down Expand Up @@ -726,6 +728,3 @@ overrides:
import/no-commonjs: off
import/no-nodejs-modules: off
import/no-extraneous-dependencies: off
# Ignore docusarus related webpack aliases
import/no-unresolved:
['error', { 'ignore': ['^@theme', '^@docusaurus', '^@generated'] }]
32 changes: 0 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ jobs:
- name: Install Dependencies
run: npm ci --ignore-scripts

# Disabled due to https://github.com/milesj/docusaurus-plugin-typedoc-api/pull/19
# - name: Check that package-lock.json doesn't have conflicts
# run: npm ls --depth 999

- name: Run npm install
run: npm install --ignore-scripts --force --package-lock-only --engine-strict --strict-peer-deps

Expand Down Expand Up @@ -219,7 +215,6 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: npm
node-version-file: '.node-version'

- name: Install Dependencies
Expand All @@ -233,30 +228,3 @@ jobs:
with:
name: denoDist
path: ./denoDist

build-website-dist:
name: Build website
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: npm
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Build Docs
run: npm run build:website

- name: Upload denoDist package
uses: actions/upload-artifact@v4
with:
name: websiteDist
path: ./websiteDist
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
/diff-npm-package.html
/.eslintcache
/.cspellcache
/.docusaurus
/node_modules
node_modules
/coverage
/npmDist
/denoDist
/websiteDist
/website/.next
/website/out
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Copied from '.gitignore', please keep it in sync.
/diff-npm-package.html
/.eslintcache
/.docusaurus
/node_modules
/coverage
/npmDist
/denoDist
/websiteDist
/website/out
.next
56 changes: 54 additions & 2 deletions cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ignorePaths:
- tsconfig.json
- benchmark/github-schema.graphql
- benchmark/github-schema.json
- website/icons
- website/css
overrides:
- filename: '**/docs-old/APIReference-*.md'
ignoreRegExpList: ['/href="[^"]*"/']
- filename: 'website/**'
dictionaries:
- fullstack
Expand Down Expand Up @@ -52,6 +52,58 @@ words:
- deno
- codecov

# Website tech
- Nextra
- headlessui
- Fastify
- svgr
- ruru

# used as href anchors
- graphqlerror
- syntaxerror
- formaterror
- graphqlschema
- graphqlscalartype
- graphqlobjecttype
- graphqlinterfacetype
- graphqluniontype
- graphqlenumtype
- graphqlinputobjecttype
- graphqllist
- graphqlnonnull
- graphqlint
- graphqlfloat
- graphqlstring
- graphqlboolean
- graphqlid
- getlocation
- isinputtype
- isoutputtype
- isleaftype
- iscompositetype
- isabstracttype
- getnullabletype
- getnamedtype
- introspectionquery
- buildclientschema
- buildschema
- printschema
- printintrospectionschema
- buildastschema
- typefromast
- astfromvalue
- typeinfo
- isvalidjsvalue
- isvalidliteralvalue
- specifiedrules
- Wordmark
- codeofconduct
- graphqlconf

# website words
- runtimes

# TODO: remove bellow words
- QLID # GraphQLID
- QLJS # GraphQLJS
Expand Down
179 changes: 0 additions & 179 deletions docs-old/APIReference-GraphQL.md

This file was deleted.

Loading

0 comments on commit d1c9c42

Please sign in to comment.