forked from dotansimha/graphql-yoga
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update website to use nextra@v3 and latest guild/components (dotansim…
…ha#3203) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Dimitri POSTOLOV <[email protected]>
- Loading branch information
1 parent
6b47038
commit 80dab2e
Showing
33 changed files
with
1,587 additions
and
981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { AppProps } from 'next/app'; | ||
import '@theguild/components/style.css'; | ||
|
||
// eslint-disable-next-line import/no-default-export | ||
export default function App({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} />; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import Link from 'next/link'; | ||
import { useRouter } from 'next/router'; | ||
import { Callout, Giscus, useTheme } from '@theguild/components'; | ||
|
||
const LATEST_VERSION = 5; | ||
|
||
function LegacyDocsBanner() { | ||
const { route } = useRouter(); | ||
const currentVersion = route.split('/')[1].replace('v', ''); | ||
return ( | ||
<Callout type="warning"> | ||
This is the documentation for the <b>old</b> GraphQL Yoga version {currentVersion}. We | ||
recommend upgrading to the latest GraphQL Yoga version {LATEST_VERSION}. | ||
<br /> | ||
<br /> | ||
<Link | ||
href={`/docs/migration/migration-from-yoga-v${currentVersion}`} | ||
className="_text-primary-600 _underline _decoration-from-font [text-underline-position:from-font]" | ||
> | ||
Migrate to GraphQL Yoga v{LATEST_VERSION} | ||
</Link> | ||
</Callout> | ||
); | ||
} | ||
|
||
export default { | ||
'*': { | ||
theme: { | ||
bottomContent: function BottomContent() { | ||
const { resolvedTheme } = useTheme(); | ||
const { route } = useRouter(); | ||
return ( | ||
<Giscus | ||
// ensure giscus is reloaded when client side route is changed | ||
key={route} | ||
repo="dotansimha/graphql-yoga" | ||
repoId="MDEwOlJlcG9zaXRvcnkxMTA4MTk5Mzk=" | ||
category="Docs Discussion" | ||
categoryId="DIC_kwDOBpr6Y84CAquY" | ||
mapping="pathname" | ||
theme={resolvedTheme} | ||
/> | ||
); | ||
}, | ||
}, | ||
}, | ||
index: { | ||
title: 'Home', | ||
type: 'page', | ||
display: 'hidden', | ||
theme: { | ||
layout: 'raw', | ||
}, | ||
}, | ||
docs: { | ||
title: 'v5 (latest)', | ||
type: 'page', | ||
}, | ||
v4: { | ||
title: 'v4', | ||
type: 'page', | ||
theme: { | ||
topContent: LegacyDocsBanner, | ||
}, | ||
}, | ||
v3: { | ||
title: 'v3', | ||
type: 'page', | ||
theme: { | ||
topContent: LegacyDocsBanner, | ||
}, | ||
}, | ||
v2: { | ||
title: 'v2', | ||
type: 'page', | ||
theme: { | ||
topContent: LegacyDocsBanner, | ||
}, | ||
}, | ||
tutorial: { | ||
title: 'Tutorial', | ||
type: 'page', | ||
}, | ||
changelog: { | ||
type: 'page', | ||
theme: { | ||
// Don't need comments in the changelog page | ||
bottomContent: null, | ||
}, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
index: 'Quick Start', | ||
features: 'Features', | ||
'prepare-for-production': 'Prepare for Production', | ||
integrations: 'Integrations', | ||
migration: 'Migration', | ||
comparison: 'Comparison', | ||
}; |
Oops, something went wrong.