Skip to content

Commit 4a86a64

Browse files
authored
website setup fixes and added missing redirects (#2262)
1 parent f8f4975 commit 4a86a64

File tree

7 files changed

+23
-196
lines changed

7 files changed

+23
-196
lines changed

patches/nextra-theme-docs+2.0.0-beta.29.patch

Lines changed: 0 additions & 141 deletions
This file was deleted.

website/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
public/sitemap.xml
2+
public/_redirects

website/next.config.mjs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,25 @@ import { withGuildDocs } from '@theguild/components/next.config';
22

33
export default withGuildDocs({
44
images: {
5-
unoptimized: true, // doesn't work with `next export`
6-
allowFutureImage: true,
5+
unoptimized: true,
76
},
87
redirects: () =>
9-
Object.entries({}).map(([from, to]) => ({
8+
Object.entries({
9+
'/di/introduction': '/docs/di/introduction',
10+
'/docs/di': '/docs/di/introduction',
11+
'/docs/legacy/recipes/type-graphql': '/docs/get-started',
12+
'/docs/introduction/getting-started': '/docs/get-started',
13+
'/docs/guides/development-environment': '/docs/get-started',
14+
'/docs/recipes/db-connection-pooling': '/docs/get-started',
15+
'/docs/legacy/recipes/development-environment': '/docs/get-started',
16+
'/docs/legacy/recipes/file-uploads': '/docs/get-started',
17+
'/docs/api.md': '/docs/api',
18+
'/docs/api/api.md': '/docs/api',
19+
'/docs/essentials': '/docs/essentials/type-definitions',
20+
'/docs/introduction/context': '/docs/essentials/context',
21+
'/docs/advanced': '/docs/advanced/subscriptions',
22+
'/docs/next/recipes/migration': '/docs/recipes/migration',
23+
}).map(([from, to]) => ({
1024
source: from,
1125
destination: to,
1226
permanent: true,
395 KB
Loading
395 KB
Loading

website/src/pages/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
title: Home
33
---
4+
45
export { IndexPage as default } from '../index-page'

website/theme.config.tsx

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,11 @@
11
/* eslint sort-keys: error */
2-
import {
3-
ModulesLogo,
4-
FooterExtended,
5-
mdxComponents,
6-
Header,
7-
Navbar,
8-
} from '@theguild/components';
9-
import { DocsThemeConfig } from 'nextra-theme-docs';
2+
import { ModulesLogo, defineConfig } from '@theguild/components';
103

114
const SITE_NAME = 'GraphQL Modules';
125

13-
// const defaultSeo: AppSeoProps = {
14-
// title: 'GraphQL Modules',
15-
// description: 'Enterprise Grade Tooling for your GraphQL Server',
16-
// logo: {
17-
// url: 'https://www.graphql-modules.com/assets/subheader-logo.png',
18-
// width: 50,
19-
// height: 54,
20-
// },
21-
// };
22-
23-
const config: DocsThemeConfig = {
24-
components: mdxComponents,
6+
export default defineConfig({
257
docsRepositoryBase:
268
'https://github.com/Urigo/graphql-modules/tree/master/website/src/pages',
27-
editLink: {
28-
text: 'Edit this page on GitHub',
29-
},
30-
feedback: {
31-
content: 'Question? Give us feedback →',
32-
labels: 'kind/docs',
33-
},
34-
footer: {
35-
component: <FooterExtended />,
36-
},
379
head: (
3810
<>
3911
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -52,26 +24,5 @@ const config: DocsThemeConfig = {
5224
</div>
5325
</>
5426
),
55-
navbar: (props) => (
56-
<>
57-
<Header
58-
accentColor="#1cc8ee"
59-
themeSwitch
60-
searchBarProps={{ version: 'v2' }}
61-
/>
62-
<Navbar {...props} />
63-
</>
64-
),
65-
project: {
66-
link: 'https://github.com/Urigo/graphql-modules',
67-
},
68-
search: {
69-
component: null,
70-
},
71-
sidebar: {
72-
defaultMenuCollapsed: true,
73-
},
7427
titleSuffix: ` – ${SITE_NAME}`,
75-
};
76-
77-
export default config;
28+
});

0 commit comments

Comments
 (0)