Skip to content
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

new graphql config website #1614

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Run `pnpm install` in the root folder

### Local Development

Run `pnpm run start` in the website root
Run `pnpm start` in the website root

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

### Build

Run `pnpm run build` in the website root
Run `pnpm build` in the website root

This command generates static content into the `build` directory and can be served using any static contents hosting service.
2 changes: 1 addition & 1 deletion website/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
35 changes: 0 additions & 35 deletions website/next.config.js

This file was deleted.

39 changes: 39 additions & 0 deletions website/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { withGuildDocs } from '@theguild/components/next.config';

export default withGuildDocs({
redirects: async () =>
Object.entries({
'/legacy': '/docs/migration',
'/docs/user/user-introduction': '/docs',
'/docs/user/user-installation': '/docs/installation',
'/docs/recipes/migration': '/docs/migration',
'/docs/user/user-documents': 'docs/user/documents',
'/docs/library/api-graphql-config': '/docs/library/graphql-config',
'/docs/library/api-graphql-project-config': '/docs/library/graphql-project-config',
'/docs/library/author-extensions': '/docs/library/extensions',
'/docs/library/author-load-config': '/docs/library/load-config',
'/docs/library/author-loaders': '/docs/library/loaders',
'/usage': '/docs/user/usage',
'/docs/user/user-usage': '/docs/user/usage',
'/docs/user': '/docs/user/usage',
'/docs/introduction': '/docs',
'/extensions': '/docs/library/extensions',
'/introduction': '/docs',
'/schema': '/docs/user/schema',
'/docs/schema': '/docs/user/schema',
'/load-config': '/docs/library/load-config',
'/docs/user/user-schema': '/docs/user/schema',
'/documents': '/docs/user/documents',
}).map(([from, to]) => ({
source: from,
destination: to,
permanent: true,
})),
output: 'export',
env: {
SITE_URL: 'https://the-guild.dev/graphql/config',
},
nextraConfig: {
contentDirBasePath: '/docs',
},
});
9 changes: 6 additions & 3 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
"scripts": {
"lint": "eslint --ignore-path ../.gitignore --ext js,jsx,cjs,mjs,ts,tsx,cts,mts .",
"dev": "next",
"build": "next build && next-sitemap",
"build": "next build",
"pagefind": "pagefind --site .next/server/app --output-path out/_pagefind",
"postbuild": "next-sitemap && pnpm pagefind",
"start": "next start",
"analyze": "cross-env ANALYZE=true pnpm run build"
},
"dependencies": {
"@theguild/components": "^7.0.0",
"@theguild/components": "9.2.0",
"next": "^15.0.0",
"next-sitemap": "^4.2.3",
"react": "^19.0.0",
Expand Down Expand Up @@ -42,7 +44,8 @@
"postcss-import": "16.1.0",
"postcss-lightningcss": "1.0.1",
"tailwindcss": "3.4.17",
"typescript": "5.7.3"
"typescript": "5.7.3",
"pagefind": "1.3.0"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
Loading
Loading