@@ -5,122 +5,32 @@ const path = require('path');
5
5
const lightCodeTheme = require ( 'prism-react-renderer/themes/github' ) ;
6
6
const darkCodeTheme = require ( 'prism-react-renderer/themes/dracula' ) ;
7
7
8
- /** @type {import('@docusaurus/types').DocusaurusConfig } */
8
+ /** @type {import('@docusaurus/types').Config } */
9
9
module . exports = {
10
10
title : 'graphql-js' ,
11
11
tagline : 'A reference implementation of GraphQL for JavaScript' ,
12
12
url : 'https://graphql-js.graphql.org' ,
13
13
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' ,
16
17
favicon : 'img/favicon.ico' ,
17
18
organizationName : 'graphql' ,
18
19
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 © ${ 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 <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
- } ,
107
20
presets : [
108
21
[
109
22
'@docusaurus/preset-classic' ,
110
- {
111
- pages : {
112
- path : './src/pages' ,
113
- } ,
23
+ /** @type {import('@docusaurus/preset-classic').Options } */
24
+ ( {
114
25
docs : {
115
- path : './tutorials' ,
116
- routeBasePath : 'tutorials' ,
117
26
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/' ,
119
29
} ,
120
30
theme : {
121
31
customCss : require . resolve ( './src/css/custom.css' ) ,
122
32
} ,
123
- } ,
33
+ } ) ,
124
34
] ,
125
35
] ,
126
36
plugins : [
@@ -132,4 +42,94 @@ module.exports = {
132
42
} ,
133
43
] ,
134
44
] ,
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 © ${ 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 <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
+ } ) ,
135
135
} ;
0 commit comments