Skip to content

Commit 29bf743

Browse files
committed
Move 'tutorials' to 'docs/tutorials'
1 parent d4bacc1 commit 29bf743

14 files changed

+113
-111
lines changed
File renamed without changes.

website/tutorials/index.md renamed to website/docs/tutorials/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: Getting Started With GraphQL.js
3-
slug: /
43
---
54

65
## Prerequisites

website/docusaurus.config.js

Lines changed: 99 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -5,122 +5,32 @@ const path = require('path');
55
const lightCodeTheme = require('prism-react-renderer/themes/github');
66
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
77

8-
/** @type {import('@docusaurus/types').DocusaurusConfig} */
8+
/** @type {import('@docusaurus/types').Config} */
99
module.exports = {
1010
title: 'graphql-js',
1111
tagline: 'A reference implementation of GraphQL for JavaScript',
1212
url: 'https://graphql-js.graphql.org',
1313
baseUrl: '/',
14-
onBrokenLinks: 'warn', // temporary need to find a way for typedoc generated docs to work
15-
onBrokenMarkdownLinks: 'warn',
14+
onBrokenLinks: 'throw',
15+
onBrokenMarkdownLinks: 'throw',
16+
onDuplicateRoutes: 'throw',
1617
favicon: 'img/favicon.ico',
1718
organizationName: 'graphql',
1819
projectName: 'graphql-js',
19-
themeConfig: {
20-
navbar: {
21-
title: 'graphql-js',
22-
logo: {
23-
alt: 'GraphQL Logo',
24-
src: 'img/logo.svg',
25-
},
26-
items: [
27-
{
28-
type: 'doc',
29-
docId: 'index',
30-
position: 'left',
31-
label: 'Tutorial',
32-
},
33-
{
34-
href: 'https://github.com/graphql/graphql-js',
35-
label: 'GitHub',
36-
position: 'right',
37-
},
38-
{
39-
to: 'api/graphql-js',
40-
label: 'API',
41-
position: 'left',
42-
},
43-
],
44-
},
45-
footer: {
46-
style: 'dark',
47-
links: [
48-
{
49-
title: 'Docs',
50-
items: [
51-
{
52-
label: 'Tutorial',
53-
to: 'tutorials',
54-
},
55-
],
56-
},
57-
{
58-
title: 'Community',
59-
items: [
60-
{
61-
label: 'Code of Conduct',
62-
href: 'https://graphql.org/codeofconduct/',
63-
},
64-
{
65-
label: 'Stack Overflow',
66-
href: 'https://stackoverflow.com/questions/tagged/graphql-js',
67-
},
68-
{
69-
label: 'Discord',
70-
href: 'https://discord.graphql.org/',
71-
},
72-
{
73-
label: 'Twitter',
74-
href: 'https://twitter.com/graphql',
75-
},
76-
{
77-
label: 'Upcoming Events',
78-
href: 'https://graphql.org/community/upcoming-events/',
79-
},
80-
],
81-
},
82-
{
83-
title: 'More',
84-
items: [
85-
{
86-
label: 'GraphQL JS Working Group',
87-
href: 'https://github.com/graphql/graphql-js-wg',
88-
},
89-
{
90-
label: 'GraphQL Foundation',
91-
href: 'https://graphql.org/foundation',
92-
},
93-
{
94-
label: 'GraphQL Spec',
95-
href: 'https://spec.graphql.org',
96-
},
97-
],
98-
},
99-
],
100-
copyright: `Copyright &copy; ${new Date().getFullYear()} <a href="https://graphql.org/foundation/" target="_blank" rel="noopener noreferrer">The GraphQL Foundation</a>. All rights reserved. <br/> For web site terms of use, trademark policy and general project policies please see&nbsp; <a href="https://lfprojects.org/" target="_blank" rel="noopener noreferrer">https://lfprojects.org</a>.`,
101-
},
102-
prism: {
103-
theme: lightCodeTheme,
104-
darkTheme: darkCodeTheme,
105-
},
106-
},
10720
presets: [
10821
[
10922
'@docusaurus/preset-classic',
110-
{
111-
pages: {
112-
path: './src/pages',
113-
},
23+
/** @type {import('@docusaurus/preset-classic').Options} */
24+
({
11425
docs: {
115-
path: './tutorials',
116-
routeBasePath: 'tutorials',
11726
sidebarPath: require.resolve('./sidebars.js'),
118-
editUrl: 'https://github.com/graphql/graphql-js/edit/main/docs/',
27+
editUrl:
28+
'https://github.com/graphql/graphql-js/edit/main/website/docs/',
11929
},
12030
theme: {
12131
customCss: require.resolve('./src/css/custom.css'),
12232
},
123-
},
33+
}),
12434
],
12535
],
12636
plugins: [
@@ -132,4 +42,94 @@ module.exports = {
13242
},
13343
],
13444
],
45+
themeConfig:
46+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
47+
({
48+
navbar: {
49+
title: 'graphql-js',
50+
logo: {
51+
alt: 'GraphQL Logo',
52+
src: 'img/logo.svg',
53+
},
54+
items: [
55+
{
56+
type: 'doc',
57+
docId: 'tutorials/index',
58+
position: 'left',
59+
label: 'Tutorial',
60+
},
61+
{
62+
href: 'https://github.com/graphql/graphql-js',
63+
label: 'GitHub',
64+
position: 'right',
65+
},
66+
{
67+
to: 'api/graphql-js',
68+
label: 'API',
69+
position: 'left',
70+
},
71+
],
72+
},
73+
footer: {
74+
style: 'dark',
75+
links: [
76+
{
77+
title: 'Docs',
78+
items: [
79+
{
80+
label: 'Tutorial',
81+
to: 'docs/tutorials/',
82+
},
83+
],
84+
},
85+
{
86+
title: 'Community',
87+
items: [
88+
{
89+
label: 'Code of Conduct',
90+
href: 'https://graphql.org/codeofconduct/',
91+
},
92+
{
93+
label: 'Stack Overflow',
94+
href: 'https://stackoverflow.com/questions/tagged/graphql-js',
95+
},
96+
{
97+
label: 'Discord',
98+
href: 'https://discord.graphql.org/',
99+
},
100+
{
101+
label: 'Twitter',
102+
href: 'https://twitter.com/graphql',
103+
},
104+
{
105+
label: 'Upcoming Events',
106+
href: 'https://graphql.org/community/upcoming-events/',
107+
},
108+
],
109+
},
110+
{
111+
title: 'More',
112+
items: [
113+
{
114+
label: 'GraphQL JS Working Group',
115+
href: 'https://github.com/graphql/graphql-js-wg',
116+
},
117+
{
118+
label: 'GraphQL Foundation',
119+
href: 'https://graphql.org/foundation',
120+
},
121+
{
122+
label: 'GraphQL Spec',
123+
href: 'https://spec.graphql.org',
124+
},
125+
],
126+
},
127+
],
128+
copyright: `Copyright &copy; ${new Date().getFullYear()} <a href="https://graphql.org/foundation/" target="_blank" rel="noopener noreferrer">The GraphQL Foundation</a>. All rights reserved. <br/> For web site terms of use, trademark policy and general project policies please see&nbsp; <a href="https://lfprojects.org/" target="_blank" rel="noopener noreferrer">https://lfprojects.org</a>.`,
129+
},
130+
prism: {
131+
theme: lightCodeTheme,
132+
darkTheme: darkCodeTheme,
133+
},
134+
}),
135135
};

website/sidebars.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
module.exports = {
44
tutorialSidebar: [
5-
'index',
6-
'running-an-express-graphql-server',
7-
'graphql-clients',
8-
'basic-types',
9-
'passing-arguments',
10-
'object-types',
11-
'mutations-and-input-types',
12-
'authentication-and-express-middleware',
5+
'tutorials/index',
6+
'tutorials/running-an-express-graphql-server',
7+
'tutorials/graphql-clients',
8+
'tutorials/basic-types',
9+
'tutorials/passing-arguments',
10+
'tutorials/object-types',
11+
'tutorials/mutations-and-input-types',
12+
'tutorials/authentication-and-express-middleware',
1313
{
1414
type: 'category',
1515
label: 'Advanced',
16-
items: ['constructing-types'],
16+
items: ['tutorials/constructing-types'],
1717
},
18-
'express-graphql',
18+
'tutorials/express-graphql',
1919
],
2020
};

website/src/pages/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ function HomepageHeader() {
1414
<h1 className="hero__title">{siteConfig.title}</h1>
1515
<p className="hero__subtitle">{siteConfig.tagline}</p>
1616
<div className={styles.buttons}>
17-
<Link className="button button--secondary button--lg" to="/tutorials">
17+
<Link
18+
className="button button--secondary button--lg"
19+
to="/docs/tutorials"
20+
>
1821
Get Started
1922
</Link>
2023
</div>

0 commit comments

Comments
 (0)