Skip to content

Commit

Permalink
Move 'tutorials' to 'docs/tutorials'
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jan 25, 2022
1 parent d4bacc1 commit 29bf743
Show file tree
Hide file tree
Showing 14 changed files with 113 additions and 111 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Getting Started With GraphQL.js
slug: /
---

## Prerequisites
Expand Down
File renamed without changes.
File renamed without changes.
198 changes: 99 additions & 99 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,122 +5,32 @@ const path = require('path');
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');

/** @type {import('@docusaurus/types').DocusaurusConfig} */
/** @type {import('@docusaurus/types').Config} */
module.exports = {
title: 'graphql-js',
tagline: 'A reference implementation of GraphQL for JavaScript',
url: 'https://graphql-js.graphql.org',
baseUrl: '/',
onBrokenLinks: 'warn', // temporary need to find a way for typedoc generated docs to work
onBrokenMarkdownLinks: 'warn',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
onDuplicateRoutes: 'throw',
favicon: 'img/favicon.ico',
organizationName: 'graphql',
projectName: 'graphql-js',
themeConfig: {
navbar: {
title: 'graphql-js',
logo: {
alt: 'GraphQL Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
docId: 'index',
position: 'left',
label: 'Tutorial',
},
{
href: 'https://github.com/graphql/graphql-js',
label: 'GitHub',
position: 'right',
},
{
to: 'api/graphql-js',
label: 'API',
position: 'left',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: 'tutorials',
},
],
},
{
title: 'Community',
items: [
{
label: 'Code of Conduct',
href: 'https://graphql.org/codeofconduct/',
},
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/graphql-js',
},
{
label: 'Discord',
href: 'https://discord.graphql.org/',
},
{
label: 'Twitter',
href: 'https://twitter.com/graphql',
},
{
label: 'Upcoming Events',
href: 'https://graphql.org/community/upcoming-events/',
},
],
},
{
title: 'More',
items: [
{
label: 'GraphQL JS Working Group',
href: 'https://github.com/graphql/graphql-js-wg',
},
{
label: 'GraphQL Foundation',
href: 'https://graphql.org/foundation',
},
{
label: 'GraphQL Spec',
href: 'https://spec.graphql.org',
},
],
},
],
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>.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
pages: {
path: './src/pages',
},
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: './tutorials',
routeBasePath: 'tutorials',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/graphql/graphql-js/edit/main/docs/',
editUrl:
'https://github.com/graphql/graphql-js/edit/main/website/docs/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
}),
],
],
plugins: [
Expand All @@ -132,4 +42,94 @@ module.exports = {
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'graphql-js',
logo: {
alt: 'GraphQL Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
docId: 'tutorials/index',
position: 'left',
label: 'Tutorial',
},
{
href: 'https://github.com/graphql/graphql-js',
label: 'GitHub',
position: 'right',
},
{
to: 'api/graphql-js',
label: 'API',
position: 'left',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: 'docs/tutorials/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Code of Conduct',
href: 'https://graphql.org/codeofconduct/',
},
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/graphql-js',
},
{
label: 'Discord',
href: 'https://discord.graphql.org/',
},
{
label: 'Twitter',
href: 'https://twitter.com/graphql',
},
{
label: 'Upcoming Events',
href: 'https://graphql.org/community/upcoming-events/',
},
],
},
{
title: 'More',
items: [
{
label: 'GraphQL JS Working Group',
href: 'https://github.com/graphql/graphql-js-wg',
},
{
label: 'GraphQL Foundation',
href: 'https://graphql.org/foundation',
},
{
label: 'GraphQL Spec',
href: 'https://spec.graphql.org',
},
],
},
],
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>.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
20 changes: 10 additions & 10 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

module.exports = {
tutorialSidebar: [
'index',
'running-an-express-graphql-server',
'graphql-clients',
'basic-types',
'passing-arguments',
'object-types',
'mutations-and-input-types',
'authentication-and-express-middleware',
'tutorials/index',
'tutorials/running-an-express-graphql-server',
'tutorials/graphql-clients',
'tutorials/basic-types',
'tutorials/passing-arguments',
'tutorials/object-types',
'tutorials/mutations-and-input-types',
'tutorials/authentication-and-express-middleware',
{
type: 'category',
label: 'Advanced',
items: ['constructing-types'],
items: ['tutorials/constructing-types'],
},
'express-graphql',
'tutorials/express-graphql',
],
};
5 changes: 4 additions & 1 deletion website/src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ function HomepageHeader() {
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link className="button button--secondary button--lg" to="/tutorials">
<Link
className="button button--secondary button--lg"
to="/docs/tutorials"
>
Get Started
</Link>
</div>
Expand Down

0 comments on commit 29bf743

Please sign in to comment.