From da9ee2aaeebfa66dfbd17b5eb0a7609baf1a2d45 Mon Sep 17 00:00:00 2001 From: Sam Nolan Date: Mon, 11 Apr 2022 10:13:11 +1000 Subject: [PATCH] Create sidebar tree --- .../docs/{ => Discussions}/Future-Features.md | 0 .../Three-Types-Of-Distributions.md | 0 .../website/docs/{ => Features}/Functions.mdx | 2 +- .../docs/{ => Features}/Javscript-library.md | 0 .../website/docs/{ => Features}/Language.mdx | 2 +- packages/website/sidebars.js | 33 ++++++++++++++++++- 6 files changed, 34 insertions(+), 3 deletions(-) rename packages/website/docs/{ => Discussions}/Future-Features.md (100%) rename packages/website/docs/{ => Discussions}/Three-Types-Of-Distributions.md (100%) rename packages/website/docs/{ => Features}/Functions.mdx (98%) rename packages/website/docs/{ => Features}/Javscript-library.md (100%) rename packages/website/docs/{ => Features}/Language.mdx (92%) diff --git a/packages/website/docs/Future-Features.md b/packages/website/docs/Discussions/Future-Features.md similarity index 100% rename from packages/website/docs/Future-Features.md rename to packages/website/docs/Discussions/Future-Features.md diff --git a/packages/website/docs/Three-Types-Of-Distributions.md b/packages/website/docs/Discussions/Three-Types-Of-Distributions.md similarity index 100% rename from packages/website/docs/Three-Types-Of-Distributions.md rename to packages/website/docs/Discussions/Three-Types-Of-Distributions.md diff --git a/packages/website/docs/Functions.mdx b/packages/website/docs/Features/Functions.mdx similarity index 98% rename from packages/website/docs/Functions.mdx rename to packages/website/docs/Features/Functions.mdx index 157cd381..95b4af68 100644 --- a/packages/website/docs/Functions.mdx +++ b/packages/website/docs/Features/Functions.mdx @@ -2,7 +2,7 @@ sidebar_position: 7 --- -import { SquiggleEditor } from "../src/components/SquiggleEditor"; +import { SquiggleEditor } from "../../src/components/SquiggleEditor"; # Squiggle Functions Reference diff --git a/packages/website/docs/Javscript-library.md b/packages/website/docs/Features/Javscript-library.md similarity index 100% rename from packages/website/docs/Javscript-library.md rename to packages/website/docs/Features/Javscript-library.md diff --git a/packages/website/docs/Language.mdx b/packages/website/docs/Features/Language.mdx similarity index 92% rename from packages/website/docs/Language.mdx rename to packages/website/docs/Features/Language.mdx index 7ec07422..e559fb60 100644 --- a/packages/website/docs/Language.mdx +++ b/packages/website/docs/Features/Language.mdx @@ -2,7 +2,7 @@ sidebar_position: 2 --- -import { SquiggleEditor } from "../src/components/SquiggleEditor"; +import { SquiggleEditor } from "../../src/components/SquiggleEditor"; # Squiggle Language diff --git a/packages/website/sidebars.js b/packages/website/sidebars.js index 96621506..cbfa1a5f 100644 --- a/packages/website/sidebars.js +++ b/packages/website/sidebars.js @@ -14,7 +14,38 @@ /** @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: 'doc', + id: 'Introduction', + label: 'Introduction' + }, + { + type: 'doc', + id: 'Playground', + label: 'Playground' + }, + { + type: 'category', + label: 'Features', + items: [ + { + type: 'autogenerated', + dirName: 'Features' + } + ] + }, + { + type: 'category', + label: 'Discussions', + items: [ + { + type: 'autogenerated', + dirName: 'Discussions', + }, + ] + } + ] // But you can create a sidebar manually /*