Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: graphql #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 39 additions & 27 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/vsDark");
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/vsDark");

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand All @@ -17,7 +17,19 @@ const config = {
organizationName: "0xintuition", // Usually your GitHub org/user name.
projectName: "published-docs", // Usually your repo name.
deploymentBranch: "gh-pages",

plugins: [
[
"docusaurus-graphql-plugin",
{
schema: "http://localhost:8080/v1/graphql",
routeBasePath: "/docs/first-api",
sidebar: {
label: "My Awesome Schema",
position: 1,
},
},
],
],
presets: [
[
"classic",
Expand All @@ -42,14 +54,14 @@ const config = {
}),
],
],
/* stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
type: 'text/css',
integrity: 'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],*/
/* stylesheets: [
{
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
type: 'text/css',
integrity: 'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],*/
i18n: {
defaultLocale: "en",
locales: ["en", "fr"],
Expand Down Expand Up @@ -105,22 +117,22 @@ const config = {
href: 'https://intuition.systems',
},
items: [
{
to: 'https://github.com/0xIntuition',
label: 'GitHub',
position: 'right',
},
{
label: 'Discord',
href: 'https://discord.com/channels/909531430881746974/1151564740255043604',
position: 'right',
},
],
},
// prism: {
//theme: darkCodeTheme,
//darkTheme: darkCodeTheme,
//},
{
to: 'https://github.com/0xIntuition',
label: 'GitHub',
position: 'right',
},
{
label: 'Discord',
href: 'https://discord.com/channels/909531430881746974/1151564740255043604',
position: 'right',
},
],
},
// prism: {
//theme: darkCodeTheme,
//darkTheme: darkCodeTheme,
//},
}),
};

Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"@mdx-js/react": "^1",
"@sillsdev/docu-notion": "^0.16.1",
"clsx": "^1.2.1",
"docusaurus-graphql-plugin": "^0.9.0",
"graphql": "^16.9.0",
"graphql-playground": "^1.3.17",
"graphql-playground-react": "^1.7.28",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down Expand Up @@ -53,6 +57,10 @@
},
"overrides": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react-dom": "^17.0.2",
"joi": "^17.11.0"
},
"resolutions": {
"joi": "^17.11.0"
}
}
3 changes: 2 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],


// But you can create a sidebar manually
/*
Expand Down
Loading